Skip to content

Commit

Permalink
improve(design): Customize Tabs horizontalItemGutter and horizontalIt…
Browse files Browse the repository at this point in the history
…emPadding token
  • Loading branch information
dengfuping committed Jan 14, 2025
1 parent 5532c59 commit 5b46672
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
1 change: 0 additions & 1 deletion packages/design/src/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ const Tabs = ({
items={newItems as AntTabsProps['items']}
type={type}
tabPosition={tabPosition}
tabBarGutter={!type || type === 'line' ? (isHorizontal ? 24 : 0) : undefined}
prefixCls={customizePrefixCls}
className={tabsCls}
{...restProps}
Expand Down
16 changes: 0 additions & 16 deletions packages/design/src/tabs/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,6 @@ export const genTagStyle: GenerateStyle<TabsToken | CardToken> = (
borderRadius: '1px',
},
},
[`${componentCls}:not(${componentCls}-card)`]: {
[`&${componentCls}-top, &${componentCls}-bottom`]: {
[`${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${token.paddingXS}px 0px`,
},
},
[`&${componentCls}-small`]: {
[`${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${token.paddingXS - token.lineWidth * 2}px 0px`,
},
},
},
},
},
};
};

Expand Down
6 changes: 6 additions & 0 deletions packages/design/src/theme/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ const defaultTheme: ThemeConfig = {
handleActiveColor: '#5189fb',
handleColorDisabled: '#b3ccff',
},
Tabs: {
horizontalItemGutter: 24,
horizontalItemPadding: '8px 0',
horizontalItemPaddingLG: '8px 0',
horizontalItemPaddingSM: '6px 0',
},
Tag: {
defaultColor: '#5c6b8a',
colorBorder: tagColorBorder,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/DateRanger/demo/simple-mode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import React from 'react';
import { DateRanger } from '@oceanbase/ui';

export default () => {
return <DateRanger simpleMode allowClear />;
return <DateRanger simpleMode />;
};

0 comments on commit 5b46672

Please sign in to comment.