Skip to content

Commit 061d838

Browse files
committed
Make size a responsive property
1 parent b3939c9 commit 061d838

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

packages/design-system/src/components/ds-split-button/ds-split-button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from 'react';
22
import type { Meta, StoryObj } from '@storybook/react-vite';
33
import { fn } from 'storybook/test';
4-
import DsSplitButton from './ds-split-button';
4+
import { DsSplitButton } from './';
55
import { splitButtonSizes } from './ds-split-button.types';
66
import type { DsSelectProps } from '../ds-select';
77

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
export { default as DsSplitButton } from './ds-split-button';
2-
export {
3-
type DsSplitButtonProps,
4-
type DsSplitButtonSlotProps,
5-
splitButtonSizes,
6-
} from './ds-split-button.types';
1+
import type { ComponentProps } from 'react';
2+
import { withResponsiveProps } from '../../utils/responsive';
3+
import DsSplitButtonBase from './ds-split-button';
4+
export { type DsSplitButtonSlotProps, splitButtonSizes } from './ds-split-button.types';
5+
6+
export const DsSplitButton = withResponsiveProps(DsSplitButtonBase, ['size']);
7+
8+
DsSplitButton.displayName = 'DsSplitButton';
9+
10+
export type DsSplitButtonProps = ComponentProps<typeof DsSplitButton>;

0 commit comments

Comments
 (0)