@aplus-frontend/ui
Version:
67 lines (66 loc) • 1.48 kB
JavaScript
import { resetComponent as o } from "../../style/index.mjs";
import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
const l = {
apTextColonMarginInline: "2px 8px"
}, i = (n) => {
const { componentCls: t, textColor3: e } = n;
return {
[t]: {
...o(n),
display: "flex",
alignItems: "baseline",
"&--vertical": {
flexDirection: "column",
alignItems: "flex-start",
[`${t}__content`]: {
maxWidth: "100%"
}
},
[`${t}__label`]: {
display: "inline-flex",
alignItems: "baseline",
color: e,
"&::after": {
content: '":"',
position: "relative",
top: "-0.5px",
marginInline: n.apTextColonMarginInline
},
"&--no-colon": {
"&::after": {
content: '""'
}
}
},
[`${t}__content`]: {
flex: 1,
minWidth: 0,
display: "flex",
alignItems: "baseline",
"&-addon-after": {
marginLeft: n.spaceXS,
"&:has(span.anticon)": {
lineHeight: 1
}
}
},
"span.ant-typography": {
color: n.textColor1
},
"span.ant-typography.ant-typography-secondary": {
color: e
},
"a.ant-typography": {
color: n.colorLink
}
}
};
}, s = a(
"ap-text",
(n) => [i(n)],
l
);
export {
s as default,
i as genApTextStyle
};