Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/components/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use these responsive card components to show data entries and information to you
<fwb-card-example />
```vue
<template>
<fwb-card href="#">
<fwb-card href="#" class="w-sm">
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Noteworthy technology acquisitions 2021
Expand All @@ -46,6 +46,7 @@ import { FwbCard } from 'flowbite-vue'
img-alt="Desk"
img-src="https://flowbite.com/docs/images/blog/image-1.jpg"
variant="image"
class="w-md"
>
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Expand All @@ -72,6 +73,7 @@ import { FwbCard } from 'flowbite-vue'
img-alt="Desk"
img-src="https://flowbite.com/docs/images/blog/image-4.jpg"
variant="horizontal"
class="w-lg"
>
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Expand Down
2 changes: 1 addition & 1 deletion docs/components/card/examples/FwbCardExample.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="vp-raw inline-flex flex-wrap gap-2">
<fwb-card href="#">
<fwb-card href="#" class="w-sm">

Check warning on line 3 in docs/components/card/examples/FwbCardExample.vue

View workflow job for this annotation

GitHub Actions / lint (18.x)

'class' should be on a new line
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Noteworthy technology acquisitions 2021
Expand Down
1 change: 1 addition & 0 deletions docs/components/card/examples/FwbCardExampleHorizontal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
img-alt="Desk"
img-src="https://flowbite.com/docs/images/blog/image-4.jpg"
variant="horizontal"
class="w-lg"
>
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Expand Down
1 change: 1 addition & 0 deletions docs/components/card/examples/FwbCardExampleImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
img-alt="Desk"
img-src="https://flowbite.com/docs/images/blog/image-1.jpg"
variant="image"
class="w-md"
>
<div class="p-5">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Expand Down
6 changes: 3 additions & 3 deletions src/components/FwbCard/composables/useCardClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export function useCardsClasses (props: UseCardsClassesProps): {
let computedClasses = ''

if (props.variant.value === 'image') {
computedClasses = 'max-w-sm rounded-lg border border-gray-200 shadow-md dark:border-gray-700'
computedClasses = 'min-w-sm rounded-lg border border-gray-200 shadow-md dark:border-gray-700'
} else if (props.variant.value === 'default') {
computedClasses = 'block max-w-sm rounded-lg border border-gray-200 shadow-md dark:border-gray-700'
computedClasses = 'block min-w-sm rounded-lg border border-gray-200 shadow-md dark:border-gray-700 '
} else if (props.variant.value === 'horizontal') {
computedClasses = 'flex flex-col items-center rounded-lg border shadow-md md:flex-row md:max-w-xl dark:border-gray-700'
computedClasses = 'flex flex-col items-center rounded-lg border shadow-md md:flex-row md:min-w-xl dark:border-gray-700'
}

if (!props.class?.value || (!props.class.value.includes('bg-'))) {
Expand Down
Loading