@bitrise/bitkit 12.3.2 → 12.4.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "12.3.2",
4
+ "version": "12.4.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,7 +1,7 @@
1
1
  import { MouseEventHandler, ReactNode, useId } from 'react';
2
2
  import { chakra } from '@chakra-ui/react';
3
3
  import { cx } from '@chakra-ui/utils';
4
- import Text from '../Text/Text';
4
+ import Text, { TextProps } from '../Text/Text';
5
5
  import Divider from '../Divider/Divider';
6
6
  import { useDropdownContext, useDropdownStyles } from './Dropdown.context';
7
7
 
@@ -45,13 +45,21 @@ const DropdownOption = <T = string,>({ value = null, children, onClick, ...rest
45
45
  );
46
46
  };
47
47
 
48
- const DropdownGroup = ({ children, label }: { children: ReactNode; label: string }) => {
48
+ const DropdownGroup = ({
49
+ children,
50
+ label,
51
+ labelProps = {},
52
+ }: {
53
+ children: ReactNode;
54
+ label: string;
55
+ labelProps?: TextProps;
56
+ }) => {
49
57
  const { group } = useDropdownStyles();
50
58
  const textId = useId();
51
59
  return (
52
60
  <div role="group" aria-labelledby={textId}>
53
61
  <chakra.div __css={group}>
54
- <Text size="1" id={textId} fontWeight="bold" color="neutral.60">
62
+ <Text size="1" id={textId} fontWeight="bold" color="neutral.60" {...labelProps}>
55
63
  {label}
56
64
  </Text>
57
65
  <Divider color="neutral.93" />