File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/components/DsfrCallout Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { VIconProps } from '../VIcon/VIcon.vue'
33
44export type DsfrCalloutProps = {
55 title ?: string
6- content : string
6+ content ? : string
77 titleTag ?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
88 button ?: DsfrButtonProps
99 icon ?: string | VIconProps
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ const iconProps = computed(() => dsfrIcon.value ? undefined : typeof props.icon
3636 {{ title }}
3737 </component >
3838
39- <p class =" fr-callout__text" >
39+ <p
40+ v-if =" content"
41+ class =" fr-callout__text"
42+ >
4043 {{ content }}
4144 </p >
4245
@@ -46,7 +49,13 @@ const iconProps = computed(() => dsfrIcon.value ? undefined : typeof props.icon
4649 />
4750
4851 <!-- @slot Slot par défaut pour le contenu de la mise en avant. Sera dans `<div class="fr-callout">` -->
49- <slot />
52+ <div
53+ v-if =" $slots.default && !content"
54+ class =" fr-callout__text"
55+ >
56+ <slot />
57+ </div >
58+ <slot v-else />
5059 </div >
5160</template >
5261
You can’t perform that action at this time.
0 commit comments