2022-03-16 19:10:36 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
2024-07-23 17:54:26 +08:00
|
|
|
import type { AliasToken } from '../theme/internal';
|
2022-03-16 19:10:36 +08:00
|
|
|
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
2024-07-23 17:54:26 +08:00
|
|
|
export const operationUnit = (token: AliasToken): CSSObject => ({
|
2022-03-24 14:30:48 +08:00
|
|
|
// FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
|
|
|
|
// And Typography use this to generate link style which should not do this.
|
|
|
|
color: token.colorLink,
|
2022-03-16 19:10:36 +08:00
|
|
|
textDecoration: 'none',
|
|
|
|
outline: 'none',
|
|
|
|
cursor: 'pointer',
|
2022-03-22 20:02:04 +08:00
|
|
|
transition: `color ${token.motionDurationSlow}`,
|
2022-03-16 19:10:36 +08:00
|
|
|
|
|
|
|
'&:focus, &:hover': {
|
2022-03-24 14:30:48 +08:00
|
|
|
color: token.colorLinkHover,
|
2022-03-16 19:10:36 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
'&:active': {
|
2022-03-24 14:30:48 +08:00
|
|
|
color: token.colorLinkActive,
|
2022-03-16 19:10:36 +08:00
|
|
|
},
|
|
|
|
});
|