Skip to content

Commit

Permalink
fix(comp:card): remove footer padding and click effect (#1418)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu committed Jan 16, 2023
1 parent ba44d0b commit 0612164
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 5 additions & 1 deletion packages/components/card/src/Card.tsx
Expand Up @@ -143,7 +143,11 @@ const renderFooter = (props: CardProps, slots: Slots, prefixCls: string) => {
itemChild = item
} else {
const { text, ...rest } = item
itemChild = <IxButton {...rest}>{text}</IxButton>
itemChild = (
<IxButton waveless={true} {...rest}>
{text}
</IxButton>
)
}
return itemChild ? <li>{itemChild}</li> : null
})
Expand Down
16 changes: 6 additions & 10 deletions packages/components/card/style/index.less
Expand Up @@ -10,15 +10,15 @@
overflow: hidden;

&-sm {
.card-size(@card-font-size-sm, @card-padding-sm);
.card-size(@card-font-size-sm, @card-padding-sm, 2px);
}

&-md {
.card-size(@card-font-size-md, @card-padding-md);
.card-size(@card-font-size-md, @card-padding-md, 4px);
}

&-lg {
.card-size(@card-font-size-lg, @card-padding-lg);
.card-size(@card-font-size-lg, @card-padding-lg, 8px);
}

&-borderless {
Expand Down Expand Up @@ -201,7 +201,7 @@
}
}

.card-size(@font-size, @card-padding) {
.card-size(@font-size, @card-padding, @footer-margin) {
.reset-font-size(@font-size);

> .@{header-prefix} {
Expand All @@ -213,15 +213,11 @@
padding: @card-padding;
}

.@{card-prefix}-footer {
padding: @card-padding;
}

.@{header-prefix} + .@{card-prefix}-body {
padding-top: 4px;
}

.@{card-prefix}-body + .@{card-prefix}-footer {
padding-top: 0;
.@{card-prefix}-footer button {
margin: @footer-margin 0;
}
}

0 comments on commit 0612164

Please sign in to comment.