mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 19:49:59 +08:00
Revert "feat: Tree add indentWidth token" (#51009)
This commit is contained in:
parent
9c3478ed77
commit
d85d99df5e
@ -48,7 +48,6 @@ const App: React.FC = () => {
|
||||
Tree: {
|
||||
nodeHoverBg: '#fff2f0',
|
||||
nodeSelectedBg: '#ffa39e',
|
||||
indentWidth: 80,
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
@ -13,11 +13,6 @@ export interface TreeSharedToken {
|
||||
* @descEN Node title height
|
||||
*/
|
||||
titleHeight: number;
|
||||
/**
|
||||
* @desc 缩进宽度
|
||||
* @descEN Indent width of tree
|
||||
*/
|
||||
indentWidth?: number;
|
||||
/**
|
||||
* @desc 节点悬浮态背景色
|
||||
* @descEN Background color of hovered node
|
||||
@ -99,15 +94,7 @@ type TreeToken = FullToken<'Tree'> & {
|
||||
};
|
||||
|
||||
export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject => {
|
||||
const {
|
||||
treeCls,
|
||||
treeNodeCls,
|
||||
treeNodePadding,
|
||||
titleHeight,
|
||||
indentWidth,
|
||||
nodeSelectedBg,
|
||||
nodeHoverBg,
|
||||
} = token;
|
||||
const { treeCls, treeNodeCls, treeNodePadding, titleHeight, nodeSelectedBg, nodeHoverBg } = token;
|
||||
const treeCheckBoxMarginHorizontal = token.paddingXS;
|
||||
|
||||
return {
|
||||
@ -236,7 +223,7 @@ export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject =>
|
||||
userSelect: 'none',
|
||||
'&-unit': {
|
||||
display: 'inline-block',
|
||||
width: indentWidth,
|
||||
width: titleHeight,
|
||||
},
|
||||
},
|
||||
|
||||
@ -547,14 +534,12 @@ export const genTreeStyle = (
|
||||
};
|
||||
|
||||
export const initComponentToken = (token: AliasToken): TreeSharedToken => {
|
||||
const { controlHeightSM, controlItemBgHover, controlItemBgActive } = token;
|
||||
const titleHeight = controlHeightSM;
|
||||
const { controlHeightSM } = token;
|
||||
|
||||
return {
|
||||
titleHeight,
|
||||
indentWidth: titleHeight,
|
||||
nodeHoverBg: controlItemBgHover,
|
||||
nodeSelectedBg: controlItemBgActive,
|
||||
titleHeight: controlHeightSM,
|
||||
nodeHoverBg: token.controlItemBgHover,
|
||||
nodeSelectedBg: token.controlItemBgActive,
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user