1 | import { TinyColor } from '@ctrl/tinycolor';
|
2 | import { initComponentToken } from '../../input/style/token';
|
3 | export const prepareComponentToken = token => {
|
4 | var _a;
|
5 | const handleVisible = (_a = token.handleVisible) !== null && _a !== void 0 ? _a : 'auto';
|
6 | return Object.assign(Object.assign({}, initComponentToken(token)), {
|
7 | controlWidth: 90,
|
8 | handleWidth: token.controlHeightSM - token.lineWidth * 2,
|
9 | handleFontSize: token.fontSize / 2,
|
10 | handleVisible,
|
11 | handleActiveBg: token.colorFillAlter,
|
12 | handleBg: token.colorBgContainer,
|
13 | filledHandleBg: new TinyColor(token.colorFillSecondary).onBackground(token.colorBgContainer).toHexString(),
|
14 | handleHoverColor: token.colorPrimary,
|
15 | handleBorderColor: token.colorBorder,
|
16 | handleOpacity: handleVisible === true ? 1 : 0
|
17 | });
|
18 | }; |
\ | No newline at end of file |