fix: usage ux

This commit is contained in:
jialin
2026-04-22 13:16:48 +08:00
committed by jialin
parent 084822814d
commit ad7fc3a993
7 changed files with 532 additions and 236 deletions
+16 -7
View File
@@ -68,12 +68,14 @@ export const SimpleCardItem: React.FC<{
<div className={cx({ bordered: bordered }, styles.wrapper)} style={style}>
<div className="title">{title}</div>
<div className="content">
<span
className={cx([iconType], 'icon')}
style={{
backgroundColor: color || 'transparent'
}}
></span>
{iconType && (
<span
className={cx([iconType], 'icon')}
style={{
backgroundColor: color || 'transparent'
}}
></span>
)}
<span>{content}</span>
</div>
</div>
@@ -89,8 +91,12 @@ export const SimpleCard: React.FC<{
}[];
height?: string | number;
bordered?: boolean;
styles?: {
wrapper?: React.CSSProperties;
item?: React.CSSProperties;
};
}> = (props) => {
const { dataList, bordered } = props;
const { dataList, bordered, styles } = props;
return (
<SimpleCardItemWrapper style={{ height: props.height || '100%' }}>
@@ -102,6 +108,9 @@ export const SimpleCard: React.FC<{
bordered={bordered}
color={item.color}
iconType={item.iconType}
style={{
...styles?.item
}}
></SimpleCardItem>
))}
</SimpleCardItemWrapper>