2022-04-25 10:54:00 +08:00
|
|
|
import type { DropdownToken } from '.';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-04-25 10:54:00 +08:00
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genButtonStyle: GenerateStyle<DropdownToken> = (token) => {
|
2022-06-17 18:47:47 +08:00
|
|
|
const { componentCls, antCls, paddingXS, opacityLoading } = token;
|
2022-04-25 10:54:00 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
[`${componentCls}-button`]: {
|
|
|
|
whiteSpace: 'nowrap',
|
|
|
|
|
|
|
|
[`&${antCls}-btn-group > ${antCls}-btn`]: {
|
|
|
|
[`&-loading, &-loading + ${antCls}-btn`]: {
|
|
|
|
cursor: 'default',
|
|
|
|
pointerEvents: 'none',
|
2022-06-17 18:47:47 +08:00
|
|
|
opacity: opacityLoading,
|
2022-04-25 10:54:00 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
[`&:last-child:not(:first-child):not(${antCls}-btn-icon-only)`]: {
|
|
|
|
paddingInline: paddingXS,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genButtonStyle;
|