UNPKG

@aplus-frontend/ui

Version:

68 lines (67 loc) 1.63 kB
import { genComponentStyleHook as i } from "../../../utils/cssinjs/index.mjs"; const a = (e) => ({ normal: { position: "absolute", content: '""', left: 0, top: "50%", transform: "translateY(-50%)", width: "3px", height: "14px", backgroundColor: e.colorPrimary, borderRadius: "0px 4px 4px 0px", zIndex: 1 }, admin: { top: "50%", transform: "translateY(-50%)", width: "8px", height: "8px", borderRadius: "50%", borderWidth: "2px", borderStyle: "solid", borderColor: e.colorPrimary, background: "#fff", zIndex: 1 } }), l = (e) => { const { componentCls: t } = e, { admin: o, normal: r } = a(e); return { [t]: { position: "relative", width: "100%", display: "flex", alignItems: "center", justifyContent: "space-between", // tips: 保证图标和文字间的距离始终为token.spaceSM paddingInlineStart: e.calc(e.spaceSM).add("3px").equal(), fontSize: e.fontSize, "&::before": r, [`${t}__prefix`]: { fontWeight: "bold", color: e.textColor1, display: "flex", alignItems: "center", ".anticon-question-circle": { fontSize: e.fontSizeLG, marginInlineStart: e.spaceXS, color: e.textColor3 } }, "&--admin": { paddingLeft: e.calc(e.spaceSM).add("8px").equal(), "&::before": o }, [`${t}__suffix`]: { color: e.textColor2 } } }; }, d = i("ApTitle", (e) => [ l(e) ]); export { d as default, l as genApTitleStyle, a as genTitlePrefix };