@thecb/components 10.11.2-beta.0 → 10.11.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +7 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-select/FormSelect.js +5 -3
- package/src/components/atoms/form-select/index.d.ts +3 -0
package/package.json
CHANGED
|
@@ -25,7 +25,9 @@ const FormSelect = ({
|
|
|
25
25
|
smoothScroll = true, // whether the browser should animate scroll to selected item on first open
|
|
26
26
|
dataQa = null,
|
|
27
27
|
widthFitOptions = false,
|
|
28
|
-
isRequired = false
|
|
28
|
+
isRequired = false,
|
|
29
|
+
labelTextVariant = "pS",
|
|
30
|
+
errorLabelTextVariant = "pXS"
|
|
29
31
|
}) => {
|
|
30
32
|
const [open, setOpen] = useState(false);
|
|
31
33
|
const dropdownRef = useRef(null);
|
|
@@ -54,7 +56,7 @@ const FormSelect = ({
|
|
|
54
56
|
<Cluster justify="space-between" align="center">
|
|
55
57
|
<Text
|
|
56
58
|
as="label"
|
|
57
|
-
variant=
|
|
59
|
+
variant={labelTextVariant}
|
|
58
60
|
color={themeValues.labelColor}
|
|
59
61
|
weight={themeValues.fontWeight}
|
|
60
62
|
extraStyles={`word-break: break-word;
|
|
@@ -101,7 +103,7 @@ const FormSelect = ({
|
|
|
101
103
|
{(field.hasErrors && field.dirty) || (field.hasErrors && showErrors) ? (
|
|
102
104
|
<Text
|
|
103
105
|
color={ERROR_COLOR}
|
|
104
|
-
variant=
|
|
106
|
+
variant={errorLabelTextVariant}
|
|
105
107
|
weight={themeValues.fontWeight}
|
|
106
108
|
extraStyles={`
|
|
107
109
|
word-break: break-word;
|
|
@@ -24,6 +24,9 @@ export interface FormSelectProps {
|
|
|
24
24
|
smoothScroll?: boolean;
|
|
25
25
|
dataQa?: string | null;
|
|
26
26
|
widthFitOptions?: boolean;
|
|
27
|
+
isRequired?: boolean;
|
|
28
|
+
labelTextVariant?: string;
|
|
29
|
+
errorLabelTextVariant?: string;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
export const FormSelect: React.FC<Expand<FormSelectProps> &
|