Skip to content

Commit

Permalink
Merge pull request #820 from dnum-mi/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
laruiss authored May 26, 2024
2 parents aa6b1bb + b983144 commit cd77f51
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions src/components/DsfrCallout/DsfrCallout.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,40 @@ export const MiseEnAvant = (args) => ({
`,

})

export const MiseEnAvantSansTitre = (args) => ({
components: {
DsfrCallout,
VIcon,
},

data () {
return {
...args,
button: args.button && {
...args.button,
onClick: args.onClick,
},
}
},

template: `
<DsfrCallout
:content="content"
:button="button"
:icon="icon"
:title-tag="titleTag"
/>
`,

})
MiseEnAvantSansTitre.args = {
button: undefined,
icon: '',
content: 'Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dol',
titleTag: undefined,
}

const buttonOnclick = fn()
MiseEnAvant.args = {
title: 'Titre de la mise en avant',
Expand Down
2 changes: 1 addition & 1 deletion src/components/DsfrCallout/DsfrCallout.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { OhVueIcon as VIcon } from 'oh-vue-icons'
import type { DsfrButtonProps } from '../DsfrButton/DsfrButton.types'

export type DsfrCalloutProps = {
title: string
title?: string
content: string
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
button?: DsfrButtonProps
Expand Down
1 change: 1 addition & 0 deletions src/components/DsfrCallout/DsfrCallout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const iconProps = computed(() => dsfrIcon.value ? undefined : typeof props.icon
v-bind="iconProps"
/>
<component
v-if="title"
:is="titleTag"
class="fr-callout__title"
>
Expand Down

0 comments on commit cd77f51

Please sign in to comment.