mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 08:19:37 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import { textEllipsis } from '../../style';
|
|
import type { GenerateStyle } from '../../theme/internal';
|
|
import type { TableToken } from './index';
|
|
|
|
const genEllipsisStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
|
|
const { componentCls } = token;
|
|
return {
|
|
[`${componentCls}-wrapper`]: {
|
|
[`${componentCls}-cell-ellipsis`]: {
|
|
...textEllipsis,
|
|
wordBreak: 'keep-all',
|
|
|
|
// Fixed first or last should special process
|
|
[`
|
|
&${componentCls}-cell-fix-left-last,
|
|
&${componentCls}-cell-fix-right-first
|
|
`]: {
|
|
overflow: 'visible',
|
|
[`${componentCls}-cell-content`]: {
|
|
display: 'block',
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
},
|
|
},
|
|
|
|
[`${componentCls}-column-title`]: {
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
wordBreak: 'keep-all',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
export default genEllipsisStyle;
|