chore: create cluster ux

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 55b0a20a4a
commit 62dbd18ef8
26 changed files with 690 additions and 392 deletions
+13 -2
View File
@@ -8,13 +8,14 @@ interface CardProps {
children?: React.ReactNode;
clickable?: boolean;
ghost?: boolean;
header?: React.ReactNode;
footer?: React.ReactNode;
onClick?: () => void;
}
const CardWrapper = styled.div`
overflow: hidden;
display: flex;
padding: 16px 20px;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
@@ -39,6 +40,12 @@ const CardWrapper = styled.div`
}
`;
const CardContent = styled.div`
padding: 16px 20px;
width: 100%;
flex: 1;
`;
const Card: React.FC<CardProps> = (props) => {
const {
className,
@@ -46,6 +53,8 @@ const Card: React.FC<CardProps> = (props) => {
children,
clickable = true,
ghost = false,
header,
footer,
onClick
} = props;
@@ -58,7 +67,9 @@ const Card: React.FC<CardProps> = (props) => {
style={{ height: height || '180px' }}
onClick={onClick}
>
{children}
{header}
<CardContent>{children}</CardContent>
{footer}
</CardWrapper>
);
};