2022-03-16 19:10:36 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { DerivativeToken } from '../theme/internal';
|
2022-03-16 19:10:36 +08:00
|
|
|
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
|
|
export const operationUnit = (token: DerivativeToken): 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
|
|
|
},
|
|
|
|
});
|