ant-design/components/_util/theme/util/operationUnit.tsx

22 lines
653 B
TypeScript
Raw Normal View History

import type { CSSObject } from '@ant-design/cssinjs';
2022-05-09 22:20:07 +08:00
import type { DerivativeToken } from '..';
// eslint-disable-next-line import/prefer-default-export
export const operationUnit = (token: DerivativeToken): CSSObject => ({
// 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,
textDecoration: 'none',
outline: 'none',
cursor: 'pointer',
transition: `color ${token.motionDurationSlow}`,
'&:focus, &:hover': {
color: token.colorLinkHover,
},
'&:active': {
color: token.colorLinkActive,
},
});