@bitrise/bitkit 12.12.0 → 12.12.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,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useMultiStyleConfig, useRadioGroup, UseRadioGroupProps } from '@chakra-ui/react';
|
|
2
|
+
import { useMultiStyleConfig, useRadioGroup, UseRadioGroupProps, forwardRef } from '@chakra-ui/react';
|
|
3
3
|
import Box, { BoxProps } from '../Box/Box';
|
|
4
4
|
import { ContentSwitcherContext, ContentSwitcherContextType } from './ContentSwitcher.context';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ export type ContentSwitcherProps = BoxProps & UseRadioGroupProps;
|
|
|
8
8
|
/**
|
|
9
9
|
* This is a custom radio button group, based on: https://chakra-ui.com/docs/components/radio/usage#custom-radio-buttons.
|
|
10
10
|
*/
|
|
11
|
-
const ContentSwitcher = (props
|
|
11
|
+
const ContentSwitcher = forwardRef<ContentSwitcherProps, 'div'>((props) => {
|
|
12
12
|
const { defaultValue, isDisabled, name, onChange, value, ...rest } = props;
|
|
13
13
|
|
|
14
14
|
const { getRootProps, getRadioProps } = useRadioGroup({
|
|
@@ -35,6 +35,6 @@ const ContentSwitcher = (props: ContentSwitcherProps) => {
|
|
|
35
35
|
<Box __css={theme.container} {...group} {...rest} />
|
|
36
36
|
</ContentSwitcherContext>
|
|
37
37
|
);
|
|
38
|
-
};
|
|
38
|
+
});
|
|
39
39
|
|
|
40
40
|
export default ContentSwitcher;
|