mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
* feat[Table]: Semantic Placement Naming Standardization * Update components/table/InternalTable.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> * feat: position warning * feat: rtl * test: update transfer snap * feat: change normalizePlacement fn * test: coverage line * test: coverage line 2 --------- Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com> Co-authored-by: 刘欢 <lh01217311@antgroup.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
import { getShadowStyle } from './fixed';
|
|
import type { TableToken } from './index';
|
|
|
|
const genStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
|
const { componentCls } = token;
|
|
|
|
const [leftShadowStyle, rightShadowStyle] = getShadowStyle(token);
|
|
|
|
return {
|
|
[`${componentCls}-wrapper-rtl`]: {
|
|
direction: 'rtl',
|
|
table: {
|
|
direction: 'rtl',
|
|
},
|
|
|
|
[`${componentCls}-row-expand-icon`]: {
|
|
float: 'right',
|
|
|
|
'&::after': {
|
|
transform: 'rotate(-90deg)',
|
|
},
|
|
|
|
'&-collapsed::before': {
|
|
transform: 'rotate(180deg)',
|
|
},
|
|
|
|
'&-collapsed::after': {
|
|
transform: 'rotate(0deg)',
|
|
},
|
|
},
|
|
|
|
// ====================== Cell ======================
|
|
[`${componentCls}-cell-fix`]: {
|
|
'&-start-shadow-show:after': rightShadowStyle,
|
|
'&-end-shadow-show:after': leftShadowStyle,
|
|
},
|
|
|
|
// =================== Container ====================
|
|
[`${componentCls}-container`]: {
|
|
[`${componentCls}-row-indent`]: {
|
|
float: 'right',
|
|
},
|
|
},
|
|
|
|
[`${componentCls}-fix-start-shadow-show ${componentCls}-container:before`]: rightShadowStyle,
|
|
[`${componentCls}-fix-end-shadow-show ${componentCls}-container:after`]: leftShadowStyle,
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genStyle;
|