@bitrise/bitkit 9.29.0-alpha-dot-migration.1 → 9.30.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": "9.29.0-alpha-dot-migration.1",
4
+ "version": "9.30.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -0,0 +1,26 @@
1
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
2
+ import { useDisclosure } from '@chakra-ui/react';
3
+ import Button from '../Button/Button';
4
+ import Box from '../Box/Box';
5
+ import Fade from './Fade';
6
+
7
+ export default {
8
+ title: 'Components/Fade',
9
+ component: Fade,
10
+ } as ComponentMeta<typeof Fade>;
11
+
12
+ export const WithProps: ComponentStory<typeof Fade> = (props) => {
13
+ const { isOpen, onToggle } = useDisclosure();
14
+
15
+ return (
16
+ <Box height="200">
17
+ <Button onClick={onToggle}>Toggle fade transition</Button>
18
+
19
+ <Fade in={isOpen} {...props}>
20
+ <Box p="32" color="neutral.10" mt="4" bg="neutral.90">
21
+ Fade
22
+ </Box>
23
+ </Fade>
24
+ </Box>
25
+ );
26
+ };
@@ -0,0 +1,12 @@
1
+ import { Fade as ChakraFade, FadeProps, forwardRef } from '@chakra-ui/react';
2
+
3
+ /**
4
+ * Fade is a transition component
5
+ */
6
+ const Fade = forwardRef<FadeProps, 'div'>((props, ref) => {
7
+ return <ChakraFade {...props} ref={ref} />;
8
+ });
9
+
10
+ export type { FadeProps };
11
+
12
+ export default Fade;
package/src/index.ts CHANGED
@@ -98,3 +98,6 @@ export { default as DialogBody } from './Components/Dialog/DialogBody';
98
98
 
99
99
  export type { DialogFooterProps } from './Components/Dialog/DialogFooter';
100
100
  export { default as DialogFooter } from './Components/Dialog/DialogFooter';
101
+
102
+ export type { FadeProps } from './Components/Transitions/Fade';
103
+ export { default as Fade } from './Components/Transitions/Fade';