radius.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genRadiusStyle = token => {
  7. const {
  8. componentCls,
  9. tableRadius
  10. } = token;
  11. return {
  12. [`${componentCls}-wrapper`]: {
  13. [componentCls]: {
  14. // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
  15. [`${componentCls}-title, ${componentCls}-header`]: {
  16. borderRadius: `${tableRadius}px ${tableRadius}px 0 0`
  17. },
  18. [`${componentCls}-title + ${componentCls}-container`]: {
  19. borderStartStartRadius: 0,
  20. borderStartEndRadius: 0,
  21. table: {
  22. borderRadius: 0,
  23. '> thead > tr:first-child': {
  24. 'th:first-child': {
  25. borderRadius: 0
  26. },
  27. 'th:last-child': {
  28. borderRadius: 0
  29. }
  30. }
  31. }
  32. },
  33. '&-container': {
  34. borderStartStartRadius: tableRadius,
  35. borderStartEndRadius: tableRadius,
  36. 'table > thead > tr:first-child': {
  37. '> *:first-child': {
  38. borderStartStartRadius: tableRadius
  39. },
  40. '> *:last-child': {
  41. borderStartEndRadius: tableRadius
  42. }
  43. }
  44. },
  45. '&-footer': {
  46. borderRadius: `0 0 ${tableRadius}px ${tableRadius}px`
  47. }
  48. }
  49. }
  50. };
  51. };
  52. var _default = exports.default = genRadiusStyle;