From dca91345c02181ef15962ee0d177cf3a2b07bc68 Mon Sep 17 00:00:00 2001 From: Andrey Akulov Date: Tue, 17 Sep 2024 19:17:05 +0500 Subject: [PATCH 1/2] feat: FwbInput: Split input and block classes --- docs/components/input.md | 28 +++++++++++++++++++ .../examples/FwbInputExampleBlockClasses.vue | 18 ++++++++++++ src/components/FwbInput/FwbInput.vue | 8 +++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docs/components/input/examples/FwbInputExampleBlockClasses.vue diff --git a/docs/components/input.md b/docs/components/input.md index fad13eda..c51fb108 100644 --- a/docs/components/input.md +++ b/docs/components/input.md @@ -3,6 +3,7 @@ import FwbInputExample from './input/examples/FwbInputExample.vue' import FwbInputExampleSize from './input/examples/FwbInputExampleSize.vue' import FwbInputExampleDisabled from './input/examples/FwbInputExampleDisabled.vue' import FwbInputExampleHelper from './input/examples/FwbInputExampleHelper.vue' +import FwbInputExampleBlockClasses from './input/examples/FwbInputExampleBlockClasses.vue' import FwbInputExamplePrefix from './input/examples/FwbInputExamplePrefix.vue' import FwbInputExampleSuffix from './input/examples/FwbInputExampleSuffix.vue' import FwbInputExampleRequired from './input/examples/FwbInputExampleRequired.vue' @@ -103,6 +104,33 @@ const name = ref('') ``` +## Extra CSS classes + +Sometimes it is required to add some customization to the input or the input wrapper. +By default `class` attibute is bind to the input element. To customize the input wrapper you an use `block-classes` property. +It accepts the values as `class` attribute + + +```vue + + + +``` + ## Slot - Helper diff --git a/docs/components/input/examples/FwbInputExampleBlockClasses.vue b/docs/components/input/examples/FwbInputExampleBlockClasses.vue new file mode 100644 index 00000000..d1c16d1f --- /dev/null +++ b/docs/components/input/examples/FwbInputExampleBlockClasses.vue @@ -0,0 +1,18 @@ + + + diff --git a/src/components/FwbInput/FwbInput.vue b/src/components/FwbInput/FwbInput.vue index 962ad294..565232e7 100644 --- a/src/components/FwbInput/FwbInput.vue +++ b/src/components/FwbInput/FwbInput.vue @@ -1,5 +1,5 @@