Skip to content

Commit 614e826

Browse files
authored
fix(card): card was not responsive (#144)
## PR Checklist Please check if your PR fulfills the following requirements: <!--- [ ] Tests for the changes have been added (for bug fixes/features)--> - [x] Docs have been added/updated (for bug fixes/features) ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no API changes) - [ ] Build related changes - [ ] CI-related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## Issue Number <!-- Bugs and features must be linked to an issue. --> Issue Number: #143 ## Does this PR introduce a breaking change? <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> - [ ] Yes - [x] No ## Other information <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated card component sizing constraints to use max-width instead of fixed width utilities * Adjusted horizontal card image layout with rounded corners and max-width styling <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents d2950a8 + c5d121d commit 614e826

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

apps/storybook/src/card.component.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const CardOrientationStory: StoryObj<StoryType> = {
177177
props: args,
178178
template: `
179179
<div flowbiteCard ${argsToTemplate(args)}>
180-
<img class="rounded-t-lg h-96 object-cover" src="images/image-2.jpg" alt="" />
180+
<img class="rounded-l-lg max-w-24 md:max-w-48 object-cover" src="images/image-2.jpg" alt="" />
181181
<div flowbiteCardContent>
182182
<h5 flowbiteCardHeader>Noteworthy technology acquisitions 2021</h5>
183183
<p class="mb-3">Here are the biggest enterprise technology acquisitions of 2021 so far, in reverse chronological order.</p>

libs/flowbite-angular/card/src/card-content/theme.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ export const flowbiteCardContentTheme: FlowbiteCardContentTheme = createTheme({
4444
},
4545
},
4646
size: {
47-
xs: 'w-xs',
48-
sm: 'w-sm',
49-
md: 'w-md',
50-
lg: 'w-lg',
51-
xl: 'w-xl',
47+
xs: 'max-w-xs',
48+
sm: 'max-w-sm',
49+
md: 'max-w-md',
50+
lg: 'max-w-lg',
51+
xl: 'max-w-xl',
5252
},
5353
},
5454
});

libs/flowbite-angular/card/src/card/theme.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ export const flowbiteCardTheme: FlowbiteCardTheme = createTheme({
6262
},
6363
},
6464
size: {
65-
xs: 'w-xs',
66-
sm: 'w-sm',
67-
md: 'w-md',
68-
lg: 'w-lg',
69-
xl: 'w-xl',
65+
xs: 'max-w-xs',
66+
sm: 'max-w-sm',
67+
md: 'max-w-md',
68+
lg: 'max-w-lg',
69+
xl: 'max-w-xl',
7070
},
7171
},
7272
});

0 commit comments

Comments
 (0)