Skip to content

Commit

Permalink
fixup! Feat(web-react): Add spacing property to Tabs component #DS-1315
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Aug 6, 2024
1 parent 92ef7a2 commit daed9e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import classNames from 'classnames';
import { CSSProperties, ElementType } from 'react';
import { useClassNamePrefix } from '../../hooks';
import { useSpacingStyle } from '../../hooks/useSpacingStyle';
import { useClassNamePrefix, useSpacingStyle } from '../../hooks';
import { SpiritStackProps } from '../../types';

interface StackCSSProperties extends CSSProperties {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ const meta: Meta<typeof UncontrolledTabs> = {
type: 'number',
},
},
spacing: {
control: 'object',
},
},
args: {
spacing: {
desktop: 'space-700',
mobile: 'space-500',
tablet: 'space-600',
},
},
};

Expand Down
3 changes: 1 addition & 2 deletions packages/web-react/src/components/Tabs/useTabsStyleProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import classNames from 'classnames';
import { CSSProperties } from 'react';
import { useClassNamePrefix } from '../../hooks';
import { useSpacingStyle } from '../../hooks/useSpacingStyle';
import { useClassNamePrefix, useSpacingStyle } from '../../hooks';
import { SpiritTabsProps } from '../../types';
import { useTabContext } from './TabContext';

Expand Down
1 change: 1 addition & 0 deletions packages/web-react/src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export * from './useIcon';
export * from './useIsomorphicLayoutEffect';
export * from './useLastActiveFocus';
export * from './useScrollControl';
export * from './useSpacingStyle';
export * from './useToggle';

0 comments on commit daed9e2

Please sign in to comment.