@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "10.11.2-beta.0",
3
+ "version": "10.11.2-beta.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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="pS"
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="pXS"
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> &