1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
|
{"ast":null,"code":"// Style as inline component\nimport { unit } from '@ant-design/cssinjs';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';\nimport { genSubStyleComponent } from '../../theme/internal';\nimport { prepareComponentToken, prepareToken } from './token';\nconst genButtonCompactStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: {\n // Special styles for Primary Button\n [`&-compact-item${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: calc(token.lineWidth).mul(-1).equal(),\n insetInlineStart: calc(token.lineWidth).mul(-1).equal(),\n display: 'inline-block',\n width: token.lineWidth,\n height: `calc(100% + ${unit(token.lineWidth)} * 2)`,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n },\n // Special styles for Primary Button\n '&-compact-vertical-item': {\n [`&${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-vertical-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: calc(token.lineWidth).mul(-1).equal(),\n insetInlineStart: calc(token.lineWidth).mul(-1).equal(),\n display: 'inline-block',\n width: `calc(100% + ${unit(token.lineWidth)} * 2)`,\n height: token.lineWidth,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nexport default genSubStyleComponent(['Button', 'compact'], token => {\n const buttonToken = prepareToken(token);\n return [\n // Space Compact\n genCompactItemStyle(buttonToken), genCompactItemVerticalStyle(buttonToken), genButtonCompactStyle(buttonToken)];\n}, prepareComponentToken);","map":{"version":3,"names":["unit","genCompactItemStyle","genCompactItemVerticalStyle","genSubStyleComponent","prepareComponentToken","prepareToken","genButtonCompactStyle","token","componentCls","calc","position","top","lineWidth","mul","equal","insetInlineStart","display","width","height","backgroundColor","colorPrimaryHover","content","buttonToken"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/button/style/compactCmp.js"],"sourcesContent":["// Style as inline component\nimport { unit } from '@ant-design/cssinjs';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';\nimport { genSubStyleComponent } from '../../theme/internal';\nimport { prepareComponentToken, prepareToken } from './token';\nconst genButtonCompactStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: {\n // Special styles for Primary Button\n [`&-compact-item${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: calc(token.lineWidth).mul(-1).equal(),\n insetInlineStart: calc(token.lineWidth).mul(-1).equal(),\n display: 'inline-block',\n width: token.lineWidth,\n height: `calc(100% + ${unit(token.lineWidth)} * 2)`,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n },\n // Special styles for Primary Button\n '&-compact-vertical-item': {\n [`&${componentCls}-primary`]: {\n [`&:not([dis
|