button.js 575 B

123456789101112131415161718192021222324
  1. const genButtonStyle = token => {
  2. const {
  3. componentCls,
  4. antCls,
  5. paddingXS,
  6. opacityLoading
  7. } = token;
  8. return {
  9. [`${componentCls}-button`]: {
  10. whiteSpace: 'nowrap',
  11. [`&${antCls}-btn-group > ${antCls}-btn`]: {
  12. [`&-loading, &-loading + ${antCls}-btn`]: {
  13. cursor: 'default',
  14. pointerEvents: 'none',
  15. opacity: opacityLoading
  16. },
  17. [`&:last-child:not(:first-child):not(${antCls}-btn-icon-only)`]: {
  18. paddingInline: paddingXS
  19. }
  20. }
  21. }
  22. };
  23. };
  24. export default genButtonStyle;