Skip to content

Commit c408d51

Browse files
authored
Merge pull request #1547 from easyops-cn/steve/card-theme
fix(card): theme variant
2 parents 073afd9 + e292434 commit c408d51

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

bricks/containers/src/card/card.shadow.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
--eo-card-header-border-bottom: none;
2323
}
2424

25+
:host([theme-variant="elevo"]) {
26+
--card-default-border-radius: 8px;
27+
--card-head-padding-horizontal-base: 16px;
28+
--card-body-padding-horizontal-base: 16px;
29+
}
30+
2531
.card {
2632
box-sizing: border-box;
2733
margin: 0;

bricks/containers/src/card/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface CardProps {
2929
compact?: boolean;
3030
outline?: CardOutline;
3131
hideSplit?: boolean;
32+
themeVariant?: "elevo" | "default";
3233
}
3334

3435
export type CardOutline =
@@ -141,6 +142,10 @@ class Card extends ReactNextElement implements CardProps {
141142
})
142143
accessor hideSplit: boolean | undefined;
143144

145+
/** 主题变体 */
146+
@property()
147+
accessor themeVariant: "default" | "elevo" | undefined;
148+
144149
render() {
145150
return (
146151
<CardComponent

0 commit comments

Comments
 (0)