frontend: add custom background color to inputField
This commit is contained in:
@@ -37,6 +37,9 @@
|
|||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
export let readonly = false;
|
export let readonly = false;
|
||||||
|
|
||||||
|
/** @type {string} */
|
||||||
|
export let backgroundColor = '--surface0'; // New prop for background color
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Event} event - The input event
|
* @param {Event} event - The input event
|
||||||
*/
|
*/
|
||||||
@@ -110,7 +113,10 @@
|
|||||||
$: selectedColor = selectedOption ? selectedOption.color : '';
|
$: selectedColor = selectedOption ? selectedOption.color : '';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="input-box {type === 'checkbox' ? 'checkbox-container' : ''}">
|
<div
|
||||||
|
class="input-box {type === 'checkbox' ? 'checkbox-container' : ''}"
|
||||||
|
style="background-color: var({backgroundColor});"
|
||||||
|
>
|
||||||
{#if type === 'checkbox'}
|
{#if type === 'checkbox'}
|
||||||
<label class="form-control {readonly ? 'form-control--disabled' : ''}">
|
<label class="form-control {readonly ? 'form-control--disabled' : ''}">
|
||||||
<input
|
<input
|
||||||
|
|||||||
Reference in New Issue
Block a user