Skip to content

Commit

Permalink
fix(card): content shrinks in horizontal orientation and action butto…
Browse files Browse the repository at this point in the history
…ns with horizontal layout
  • Loading branch information
inikolova committed Jan 8, 2024
1 parent f3ba688 commit 0ec00d0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/default/scss/card/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@
gap: $kendo-card-actions-gap;
}

.k-card-horizontal .k-actions-horizontal {
width: auto;
}

// List
.k-card-list {
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions packages/fluent/scss/card/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@
gap: var( --kendo-card-actions-gap, #{$kendo-card-actions-gap} );
}

.k-card-horizontal .k-actions-horizontal {
width: auto;
}

// List
.k-card-list {
display: flex;
Expand Down
14 changes: 12 additions & 2 deletions packages/html/src/card/tests/card-horizontal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from '../../button';

const styles = `
.k-card {
height: 300px;
height: 250px;
}
.k-card-media {
display: block;
Expand All @@ -17,7 +17,7 @@ const styles = `
export default () =>(
<>
<style>{styles}</style>
<div id="test-area" className="k-d-grid k-grid-cols-4">
<div id="test-area" className="k-d-grid k-grid-cols-3">

<CardHorizontal />

Expand Down Expand Up @@ -96,6 +96,16 @@ export default () =>(
</ActionButtons>
</CardHorizontal>

<CardHorizontal >
<CardBody title="Card Title" subtitle="Horizontal card - Action buttons with horizontal layout.">
<p>Horizontal card - Action buttons with horizontal layout.</p>
</CardBody>
<ActionButtons className="k-card-actions">
<Button fillMode="flat" themeColor="primary">Action 1</Button>
<Button fillMode="flat" themeColor="primary">Action 2</Button>
</ActionButtons>
</CardHorizontal>

</div>
</>
);

0 comments on commit 0ec00d0

Please sign in to comment.