@bitrise/bitkit 10.36.2 → 11.0.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.
Files changed (64) hide show
  1. package/package.json +17 -38
  2. package/src/Components/Menu/MenuItem.tsx +1 -1
  3. package/tsconfig.json +0 -5
  4. package/src/Components/Accordion/Accordion.stories.tsx +0 -63
  5. package/src/Components/Accordion/Accordion.test.tsx +0 -34
  6. package/src/Components/AspectRatio/AspectRatio.stories.tsx +0 -24
  7. package/src/Components/Avatar/Avatar.stories.tsx +0 -15
  8. package/src/Components/Badge/Badge.stories.tsx +0 -13
  9. package/src/Components/Box/Box.stories.tsx +0 -20
  10. package/src/Components/Breadcrumb/Breadcrumb.stories.tsx +0 -49
  11. package/src/Components/Button/Button.stories.tsx +0 -25
  12. package/src/Components/ButtonGroup/ButtonGroup.stories.tsx +0 -21
  13. package/src/Components/Card/Card.stories.tsx +0 -44
  14. package/src/Components/ColorButton/ColorButton.stories.tsx +0 -30
  15. package/src/Components/DatePicker/DatePicker.stories.tsx +0 -16
  16. package/src/Components/DatePicker/DatePicker.test.tsx +0 -94
  17. package/src/Components/Dialog/Dialog.stories.tsx +0 -82
  18. package/src/Components/Divider/Divider.stories.tsx +0 -18
  19. package/src/Components/Dot/Dot.stories.tsx +0 -15
  20. package/src/Components/Dropdown/Dropdown.stories.tsx +0 -154
  21. package/src/Components/Dropdown/Dropdown.test.tsx +0 -626
  22. package/src/Components/EmptyState/EmptyState.stories.tsx +0 -18
  23. package/src/Components/Fade/Fade.stories.tsx +0 -5
  24. package/src/Components/Form/Checkbox/Checkbox.stories.tsx +0 -43
  25. package/src/Components/Form/Input/Input.stories.tsx +0 -71
  26. package/src/Components/Form/Radio/Radio.stories.tsx +0 -35
  27. package/src/Components/Form/Textarea/Textarea.stories.tsx +0 -20
  28. package/src/Components/Form/Textarea/Textarea.test.tsx +0 -35
  29. package/src/Components/Icon/Icon.stories.tsx +0 -10
  30. package/src/Components/IconButton/IconButton.stories.tsx +0 -27
  31. package/src/Components/Icons/index.stories.tsx +0 -60
  32. package/src/Components/Image/Image.stories.tsx +0 -15
  33. package/src/Components/LightBox/LightBox.stories.tsx +0 -39
  34. package/src/Components/Link/Link.stories.tsx +0 -28
  35. package/src/Components/List/List.stories.tsx +0 -24
  36. package/src/Components/Menu/Menu.stories.tsx +0 -90
  37. package/src/Components/Notification/Notification.stories.tsx +0 -84
  38. package/src/Components/OverflowMenu/OverflowMenu.stories.tsx +0 -30
  39. package/src/Components/Popover/Popover.stories.tsx +0 -19
  40. package/src/Components/ProgressBar/ProgressBar.stories.tsx +0 -11
  41. package/src/Components/ProgressBitbot/ProgressBitbot.stories.tsx +0 -12
  42. package/src/Components/ProgressSpinner/ProgressSpinner.stories.tsx +0 -12
  43. package/src/Components/Ribbon/Ribbon.stories.tsx +0 -35
  44. package/src/Components/Select/Select.stories.tsx +0 -100
  45. package/src/Components/Select/Select.test.tsx +0 -96
  46. package/src/Components/Skeleton/Skeleton.stories.tsx +0 -18
  47. package/src/Components/Table/Table.stories.tsx +0 -216
  48. package/src/Components/Tabs/Tabs.stories.tsx +0 -65
  49. package/src/Components/Tabs/Tabs.test.tsx +0 -36
  50. package/src/Components/Text/Text.stories.tsx +0 -22
  51. package/src/Components/Toast/Toast.stories.tsx +0 -30
  52. package/src/Components/Toggle/Toggle.stories.tsx +0 -19
  53. package/src/Foundations/Colors/Colors.stories.mdx +0 -9
  54. package/src/Foundations/Radii/Radii.examples.tsx +0 -25
  55. package/src/Foundations/Radii/Radii.stories.mdx +0 -6
  56. package/src/Foundations/Responsive/Responsive.examples.tsx +0 -95
  57. package/src/Foundations/Responsive/Responsive.stories.mdx +0 -6
  58. package/src/Foundations/Shadows/Shadows.examples.tsx +0 -24
  59. package/src/Foundations/Shadows/Shadows.stories.mdx +0 -6
  60. package/src/Foundations/Sizes/Sizes.examples.tsx +0 -25
  61. package/src/Foundations/Sizes/Sizes.stories.mdx +0 -6
  62. package/src/Foundations/Typography/Typography.examples.tsx +0 -63
  63. package/src/Foundations/Typography/Typography.stories.mdx +0 -8
  64. package/src/tsconfig.tsbuildinfo +0 -1
@@ -1,43 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import CheckboxGroup from './CheckboxGroup';
3
- import Checkbox from './Checkbox';
4
-
5
- export default {
6
- component: Checkbox,
7
- argTypes: {
8
- onChange: {
9
- action: 'onChange event',
10
- },
11
- },
12
- } as ComponentMeta<typeof Checkbox>;
13
-
14
- const Template: ComponentStory<typeof Checkbox> = (props) => <Checkbox {...props} />;
15
-
16
- export const WithProps = Template.bind({});
17
- WithProps.args = {
18
- children: 'Checkbox',
19
- isDisabled: false,
20
- isIndeterminate: false,
21
- };
22
-
23
- export const InGroup: ComponentStory<typeof CheckboxGroup> = (props) => (
24
- <CheckboxGroup {...props} display="flex" gap="24">
25
- <Checkbox value="1">
26
- Checkbox 1<br />
27
- asddssadsda
28
- </Checkbox>
29
- <Checkbox
30
- value="2"
31
- inputProps={{
32
- 'data-testid': 'test-checkbox-2',
33
- }}
34
- >
35
- Checkbox 2
36
- </Checkbox>
37
- <Checkbox value="3">Checkbox 3</Checkbox>
38
- </CheckboxGroup>
39
- );
40
-
41
- InGroup.args = {
42
- defaultValue: ['1', '3'],
43
- };
@@ -1,71 +0,0 @@
1
- import { ComponentMeta } from '@storybook/react';
2
- import Button from '@/Components/Button/Button';
3
- import IconButton from '@/Components/IconButton/IconButton';
4
- import Input from './Input';
5
-
6
- export default {
7
- component: Input,
8
- argTypes: {
9
- type: {
10
- control: 'inline-radio',
11
- options: ['number', 'password', 'text'],
12
- },
13
- },
14
- args: {
15
- isDisabled: false,
16
- isInvalid: false,
17
- isLoading: false,
18
- isReadOnly: false,
19
- label: 'Input',
20
- placeholder: 'Placeholder text',
21
- type: 'text',
22
- },
23
- } as ComponentMeta<typeof Input>;
24
-
25
- export const WithProps = {
26
- args: {
27
- errorText: '',
28
- helperText:
29
- 'Inline help. Maecenas a turpis tortor. Nunc vitae libero tempor, ullamcorper purus quis, mattis tellus.',
30
- label: 'Input',
31
- },
32
- };
33
-
34
- export const WithElementOutside = {
35
- args: {
36
- isDisabled: true,
37
- label: 'With additional element outside (Like Button)',
38
- rightAddon: (
39
- <Button borderLeftRadius="0" leftIconName="Duplicate" variant="secondary">
40
- Copy to clipboard
41
- </Button>
42
- ),
43
- rightAddonPlacement: 'outside',
44
- value: '1234567890ABCDE',
45
- },
46
- };
47
-
48
- export const WithElementInside = {
49
- args: {
50
- label: 'With additional element inside (Like IconButton)',
51
- rightAddon: (
52
- <IconButton
53
- aria-label="Search"
54
- borderLeftRadius="0"
55
- iconName="Magnifier"
56
- variant="tertiary"
57
- _active={{ background: 'transparent' }}
58
- _hover={{ background: 'transparent' }}
59
- />
60
- ),
61
- rightAddonPlacement: 'inside',
62
- width: '100%',
63
- },
64
- };
65
-
66
- export const WithIcon = {
67
- args: {
68
- label: 'With Icon on the left and/or right side',
69
- leftIconName: 'Magnifier',
70
- },
71
- };
@@ -1,35 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import RadioGroup from './RadioGroup';
3
- import Radio from './Radio';
4
-
5
- export default {
6
- component: Radio,
7
- argTypes: {
8
- onChange: {
9
- action: 'onChange event',
10
- },
11
- },
12
- } as ComponentMeta<typeof Radio>;
13
-
14
- export const InGroup: ComponentStory<typeof RadioGroup> = (props) => (
15
- <RadioGroup {...props} display="flex" gap="24">
16
- <Radio value="1">
17
- Radio 1<br />
18
- asdasddsa
19
- </Radio>
20
- <Radio
21
- value="2"
22
- inputProps={{
23
- 'data-testid': 'test-radio-2',
24
- }}
25
- >
26
- Radio 2
27
- </Radio>
28
- <Radio value="3">Radio 3</Radio>
29
- </RadioGroup>
30
- );
31
-
32
- InGroup.args = {
33
- defaultValue: '2',
34
- name: 'radioName',
35
- };
@@ -1,20 +0,0 @@
1
- import { ComponentMeta } from '@storybook/react';
2
- import Textarea from './Textarea';
3
-
4
- export default {
5
- component: Textarea,
6
- } as ComponentMeta<typeof Textarea>;
7
-
8
- export const WithProps = {
9
- args: {
10
- errorText: '',
11
- helperText:
12
- 'Inline help. Maecenas a turpis tortor. Nunc vitae libero tempor, ullamcorper purus quis, mattis tellus.',
13
- isDisabled: false,
14
- isInvalid: false,
15
- isLoading: false,
16
- isReadOnly: false,
17
- label: 'Textarea',
18
- placeholder: 'Placeholder text',
19
- },
20
- };
@@ -1,35 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
- import userEvent from '@testing-library/user-event';
3
- import { useForm } from 'react-hook-form';
4
- import Textarea from './Textarea';
5
-
6
- describe('Textarea', () => {
7
- it('forwards data-testid', async () => {
8
- render(<Textarea data-testid="testid" />);
9
- const elem = await screen.findByTestId('testid');
10
- expect(elem.tagName).toBe('TEXTAREA');
11
- expect(elem).toBeInTheDocument();
12
- });
13
- describe('react-hook-form support', () => {
14
- it('sends data when submitted', async () => {
15
- const handler = jest.fn();
16
- const TestComponent = () => {
17
- const { register, handleSubmit } = useForm();
18
- return (
19
- <form onSubmit={handleSubmit((data) => handler(data))}>
20
- <Textarea {...register('textarea')} />
21
- <button type="submit">Send</button>
22
- </form>
23
- );
24
- };
25
- render(<TestComponent />);
26
- const submit = await screen.findByRole('button', { name: 'Send' });
27
- const textarea = await screen.findByRole('textbox');
28
- await userEvent.type(textarea, 'test');
29
- await userEvent.click(submit);
30
-
31
- expect(handler).toHaveBeenCalledWith({ textarea: 'test' });
32
- expect(handler).toHaveBeenCalledTimes(1);
33
- });
34
- });
35
- });
@@ -1,10 +0,0 @@
1
- import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import Icon from './Icon';
3
-
4
- export default {
5
- title: 'Components/Icon',
6
- args: { name: 'Bitbot' },
7
- component: Icon,
8
- } as ComponentMeta<typeof Icon>;
9
-
10
- export const Default: ComponentStory<typeof Icon> = (args) => <Icon {...args} />;
@@ -1,27 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import { sortObjectByKey } from '../../utils/storyUtils';
3
- import IconButton from './IconButton';
4
-
5
- export default {
6
- title: 'Components/IconButton',
7
- component: IconButton,
8
- argTypes: {
9
- as: {
10
- control: 'inline-radio',
11
- options: ['a', 'button'],
12
- },
13
- },
14
- } as ComponentMeta<typeof IconButton>;
15
-
16
- const Template: ComponentStory<typeof IconButton> = (props) => <IconButton {...props} />;
17
-
18
- export const WithProps = Template.bind({});
19
- WithProps.args = sortObjectByKey({
20
- ...IconButton.defaultProps,
21
- 'aria-label': 'This is the label',
22
- iconName: 'Bitbot',
23
- isDanger: false,
24
- isDisabled: false,
25
- isLoading: false,
26
- isTooltipDisabled: false,
27
- });
@@ -1,60 +0,0 @@
1
- import { Fragment } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { Grid, GridItem, Tooltip, useClipboard, useToast } from '@chakra-ui/react';
4
- import Icon, { TypeIconName } from '../Icon/Icon';
5
- import Text from '../Text/Text';
6
- import * as bigIcons from './24x24';
7
-
8
- export default { title: 'Components/Icons' } as Meta;
9
-
10
- const IconCard = ({ iconName }: { iconName: string }) => {
11
- const { onCopy } = useClipboard(iconName, {});
12
- const toast = useToast();
13
- return (
14
- <Tooltip
15
- label={
16
- <Text textAlign="center">
17
- {iconName} <br /> click to copy <Icon size="16" color="white" name="Duplicate" />
18
- </Text>
19
- }
20
- >
21
- <Grid
22
- onClick={() => {
23
- onCopy();
24
- toast.closeAll();
25
- toast({
26
- title: (
27
- <>
28
- Copied <code>{iconName}</code>!
29
- </>
30
- ),
31
- });
32
- }}
33
- cursor="pointer"
34
- background="neutral.50"
35
- alignContent="space-around"
36
- gridTemplateColumns="1f 1f"
37
- padding="8"
38
- gap="4"
39
- alignItems="center"
40
- margin="4"
41
- >
42
- <Icon marginX="auto" name={iconName as TypeIconName} size="24" />
43
- <Icon marginX="auto" name={iconName as TypeIconName} size="16" />
44
- <GridItem as={Text} hasEllipsis textAlign="center" fontSize="2" lineHeight="2" colSpan={2}>
45
- {iconName}
46
- </GridItem>
47
- </Grid>
48
- </Tooltip>
49
- );
50
- };
51
-
52
- export const List = () => (
53
- <Grid gap="2" templateColumns="repeat(auto-fit, minmax(150px, 1fr))">
54
- {Object.keys(bigIcons).map((icon) => (
55
- <Fragment key={icon}>
56
- <IconCard iconName={icon} />
57
- </Fragment>
58
- ))}
59
- </Grid>
60
- );
@@ -1,15 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import Image from './Image';
3
-
4
- export default {
5
- title: 'Components/Image',
6
- component: Image,
7
- } as ComponentMeta<typeof Image>;
8
-
9
- const Template: ComponentStory<typeof Image> = (props) => <Image {...props} />;
10
-
11
- export const WithProps = Template.bind({});
12
- WithProps.args = {
13
- alt: 'Bitrise office',
14
- src: 'bitrise_office.jpg',
15
- };
@@ -1,39 +0,0 @@
1
- import { Story, ComponentMeta } from '@storybook/react';
2
- import { useDisclosure } from '@chakra-ui/react';
3
- import Button from '../Button/Button';
4
- import AspectRatio from '../AspectRatio/AspectRatio';
5
- import LightBox, { LightBoxProps } from './LightBox';
6
-
7
- export default {
8
- title: 'Components/LightBox',
9
- component: LightBox,
10
- } as ComponentMeta<typeof LightBox>;
11
-
12
- export const WithProps: Story<LightBoxProps> = ({ ...props }: LightBoxProps) => {
13
- const { isOpen, onClose, onOpen } = useDisclosure();
14
-
15
- const getContent = () => {
16
- return (
17
- <AspectRatio ratio={props.size === 'full' ? 1.33 : 1.77}>
18
- <iframe
19
- id="ytplayer"
20
- title="Intro to Bitrise"
21
- src="https://www.youtube.com/embed/JrCn9xWQ7IM"
22
- frameBorder="0"
23
- allowFullScreen
24
- />
25
- </AspectRatio>
26
- );
27
- };
28
-
29
- return (
30
- <>
31
- <Button onClick={onOpen}>Open LightBox</Button>
32
- <LightBox padding="0" {...props} isOpen={isOpen} onClose={onClose}>
33
- {getContent()}
34
- </LightBox>
35
- </>
36
- );
37
- };
38
-
39
- WithProps.args = { ...LightBox.defaultProps };
@@ -1,28 +0,0 @@
1
- /* eslint-disable jsx-a11y/anchor-is-valid */
2
- import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- import { sortObjectByKey } from '../../utils/storyUtils';
4
- import Text from '../Text/Text';
5
- import Link from './Link';
6
-
7
- export default {
8
- title: 'Components/Link',
9
- component: Link,
10
- } as ComponentMeta<typeof Link>;
11
-
12
- const args = sortObjectByKey({
13
- ...Link.defaultProps,
14
- children: 'The quick brown fox jumps over the lazy dog.',
15
- href: '#',
16
- });
17
-
18
- export const WithProps: ComponentStory<typeof Link> = (props) => <Link {...props} />;
19
- WithProps.args = args;
20
-
21
- export const InsideText: ComponentStory<typeof Link> = (props) => (
22
- <Text size="2">
23
- This is a text with link: <Link {...props} />
24
- <br />
25
- The Link inherits fontSize, but you can overwrite with size param (or sx).
26
- </Text>
27
- );
28
- InsideText.args = args;
@@ -1,24 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import List from './List';
3
- import ListItem from './ListItem';
4
-
5
- export default {
6
- title: 'Components/List',
7
- component: List,
8
- } as ComponentMeta<typeof List>;
9
-
10
- export const WithProps: ComponentStory<typeof List> = (props) => (
11
- <List {...props}>
12
- <ListItem>Lorem ipsum dolor sit amet</ListItem>
13
- <ListItem>Consectetur adipiscing elit</ListItem>
14
- <ListItem>
15
- Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo.
16
- </ListItem>
17
- <ListItem>Facilisis in pretium nisl aliquet</ListItem>
18
- </List>
19
- );
20
-
21
- WithProps.args = {
22
- ...List.defaultProps,
23
- isOrdered: false,
24
- };
@@ -1,90 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import { forwardRef } from '@chakra-ui/react';
3
- import Badge from '../Badge/Badge';
4
- import Box from '../Box/Box';
5
- import Button, { ButtonProps } from '../Button/Button';
6
- import ButtonGroup from '../ButtonGroup/ButtonGroup';
7
- import IconButton from '../IconButton/IconButton';
8
- import Link from '../Link/Link';
9
- import Icon from '../Icon/Icon';
10
- import Menu from './Menu';
11
- import MenuButton from './MenuButton';
12
- import MenuList from './MenuList';
13
- import MenuItem from './MenuItem';
14
-
15
- export default {
16
- title: 'Components/Menu',
17
- component: Menu,
18
- subcomponents: { MenuButton, MenuList, MenuItem },
19
- } as ComponentMeta<typeof Menu>;
20
-
21
- const List = () => (
22
- <MenuList>
23
- <MenuItem iconName="Download">Download</MenuItem>
24
- <MenuItem as="a" href="#" iconName="Link">
25
- As a link
26
- </MenuItem>
27
- <MenuItem iconName="Pencil" isDisabled>
28
- Disabled
29
- </MenuItem>
30
- <MenuItem iconName="DeleteNope" isDanger>
31
- Danger version
32
- </MenuItem>
33
- </MenuList>
34
- );
35
-
36
- export const WithButton: ComponentStory<typeof Menu> = () => (
37
- <Menu>
38
- <MenuButton as={Button}>Actions</MenuButton>
39
- <List />
40
- </Menu>
41
- );
42
-
43
- export const WithLink: ComponentStory<typeof Menu> = () => (
44
- <Menu>
45
- <MenuButton as={Link}>Open menu</MenuButton>
46
- <List />
47
- </Menu>
48
- );
49
-
50
- export const WithButtonGroup: ComponentStory<typeof Menu> = () => (
51
- <Box display="flex" justifyContent="flex-end">
52
- <ButtonGroup isAttached>
53
- <Button>Button</Button>
54
- <Menu>
55
- <MenuButton as={IconButton} iconName="AddonsTuorqouise" aria-label="Open menu" isTooltipDisabled />
56
- <List />
57
- </Menu>
58
- </ButtonGroup>
59
- </Box>
60
- );
61
-
62
- const TriggerButton = forwardRef<ButtonProps, 'button'>((props, ref) => (
63
- <Button gap="12" ref={ref} rightIconName="DropdownArrows" variant="secondary" {...props}>
64
- <span>Attempt #3</span>
65
- <Badge>Latest</Badge>
66
- </Button>
67
- ));
68
-
69
- export const WithCustomItems: ComponentStory<typeof Menu> = () => {
70
- return (
71
- <Menu>
72
- <MenuButton as={TriggerButton} />
73
- <MenuList>
74
- <MenuItem>
75
- <Box display="flex" alignItems="center" gap="8">
76
- <Icon color="green.50" name="BuildstatusSuccessful" />
77
- <span>Successful</span>
78
- <Badge>Latest</Badge>
79
- </Box>
80
- </MenuItem>
81
- <MenuItem>
82
- <Box display="flex" alignItems="center" gap="8">
83
- <Icon color="red.50" name="BuildstatusFailed" />
84
- <span>Failed</span>
85
- </Box>
86
- </MenuItem>
87
- </MenuList>
88
- </Menu>
89
- );
90
- };
@@ -1,84 +0,0 @@
1
- import { ComponentMeta, ComponentStoryFn } from '@storybook/react';
2
- import { action } from '@storybook/addon-actions';
3
- import Link from '../Link/Link';
4
- import Notification from './Notification';
5
-
6
- export default {
7
- title: 'Components/Notification',
8
- component: Notification,
9
- argTypes: {
10
- children: { type: 'string', defaultValue: 'text' },
11
- action: {
12
- control: 'inline-radio',
13
- options: ['unset', 'link', 'action'],
14
- mapping: {
15
- unset: undefined,
16
- link: { label: 'link', href: '#' },
17
- action: { label: 'action', onClick: action('action') },
18
- },
19
- },
20
- onClose: {
21
- control: 'inline-radio',
22
- options: ['unset', 'action'],
23
- mapping: {
24
- unset: undefined,
25
- action: action('onClose'),
26
- },
27
- },
28
- },
29
- args: {
30
- status: 'info',
31
- },
32
- } as ComponentMeta<typeof Notification>;
33
-
34
- const Template: ComponentStoryFn<typeof Notification> = (props) => <Notification {...props} />;
35
-
36
- export const Default: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
37
- Default.args = {
38
- action: undefined,
39
- };
40
-
41
- export const WithCustomIcon: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
42
- WithCustomIcon.storyName = 'With custom icon';
43
- WithCustomIcon.args = {
44
- action: undefined,
45
- iconName: 'Bitbot',
46
- };
47
-
48
- export const WithoutIcon: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
49
- WithoutIcon.storyName = 'Without icon';
50
- WithoutIcon.args = {
51
- action: undefined,
52
- showIcon: false,
53
- };
54
-
55
- export const WithAction: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
56
- WithAction.storyName = 'With action';
57
- WithAction.args = {
58
- action: {
59
- label: 'Upgrade',
60
- },
61
- };
62
-
63
- export const WithActionAfterContent: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
64
- WithActionAfterContent.storyName = 'With action after content';
65
- WithActionAfterContent.args = {
66
- action: {
67
- label: 'Upgrade',
68
- placement: 'after-content',
69
- },
70
- };
71
-
72
- export const WithLink: ComponentStoryFn<typeof Notification> = (props) => <Template {...props} />;
73
- WithLink.storyName = 'With link';
74
- WithLink.args = {
75
- children: (
76
- <>
77
- Unable to send build status back to your git host. Please check{' '}
78
- <Link href="#/" isUnderlined>
79
- our guide
80
- </Link>
81
- .
82
- </>
83
- ),
84
- };
@@ -1,30 +0,0 @@
1
- import { ComponentStory, ComponentMeta } from '@storybook/react';
2
- import Box from '../Box/Box';
3
- import OverflowMenu from './OverflowMenu';
4
- import OverflowMenuItem from './OverflowMenuItem';
5
-
6
- export default {
7
- title: 'Components/OverflowMenu',
8
- component: OverflowMenu,
9
- } as ComponentMeta<typeof OverflowMenu>;
10
-
11
- export const WithProps: ComponentStory<typeof OverflowMenu> = (props) => (
12
- <Box display="flex" flexDirection="column" alignItems="flex-end" minHeight="400px">
13
- <OverflowMenu {...props}>
14
- <OverflowMenuItem iconName="PlusAdd">Add member</OverflowMenuItem>
15
- <OverflowMenuItem iconName="MinusRemove">Remove member</OverflowMenuItem>
16
- <OverflowMenuItem as="a" iconName="Link" href="#">
17
- As a link
18
- </OverflowMenuItem>
19
- <OverflowMenuItem iconName="Pencil" isDisabled>
20
- Disabled item
21
- </OverflowMenuItem>
22
- <OverflowMenuItem iconName="Trash" isDanger>
23
- Danger version
24
- </OverflowMenuItem>
25
- </OverflowMenu>
26
- </Box>
27
- );
28
- WithProps.args = {
29
- ...OverflowMenu.defaultProps,
30
- };
@@ -1,19 +0,0 @@
1
- import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import Button from '../Button/Button';
3
- import Popover from './Popover';
4
- import PopoverTrigger from './PopoverTrigger';
5
- import PopoverContent from './PopoverContent';
6
-
7
- export default {
8
- title: 'Components/Popover',
9
- component: Popover,
10
- } as ComponentMeta<typeof Popover>;
11
-
12
- export const Default: ComponentStory<typeof Popover> = () => (
13
- <Popover>
14
- <PopoverTrigger>
15
- <Button>Open popover</Button>
16
- </PopoverTrigger>
17
- <PopoverContent>Test content</PopoverContent>
18
- </Popover>
19
- );
@@ -1,11 +0,0 @@
1
- import ProgressBar from './ProgressBar';
2
-
3
- export default {
4
- component: ProgressBar,
5
- };
6
-
7
- export const WithProps = {
8
- args: {
9
- value: 35,
10
- },
11
- };
@@ -1,12 +0,0 @@
1
- import ProgressBitbot from './ProgressBitbot';
2
-
3
- export default {
4
- component: ProgressBitbot,
5
- };
6
-
7
- export const WithProps = {
8
- args: {
9
- content: 'Loading...',
10
- size: 64,
11
- },
12
- };
@@ -1,12 +0,0 @@
1
- import ProgressSpinner from './ProgressSpinner';
2
-
3
- export default {
4
- component: ProgressSpinner,
5
- };
6
-
7
- export const WithProps = {
8
- args: {
9
- color: 'purple.40',
10
- size: 24,
11
- },
12
- };