Skip to content

Commit

Permalink
fix(NeBadge): fix icon prop and storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
andre8244 authored and Tbaile committed Jan 5, 2024
1 parent df7bf13 commit 552cc14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/components/NeBadge.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
Copyright (C) 2024 Nethesis S.r.l.
SPDX-License-Identifier: GPL-3.0-or-later
-->

<script lang="ts" setup>
import { computed, type PropType } from 'vue'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
Expand Down Expand Up @@ -45,7 +50,7 @@ const props = defineProps({
* Icon to display inside the badge.
*/
icon: {
type: Array<string>,
type: Object,
required: false,
default: undefined
},
Expand Down
9 changes: 6 additions & 3 deletions stories/NeBadge.stories.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright (C) 2024 Nethesis S.r.l.
// SPDX-License-Identifier: GPL-3.0-or-later

import { Meta, StoryObj } from '@storybook/vue3'
import { faXmark } from '@fortawesome/free-solid-svg-icons'
import { faHeart } from '@fortawesome/free-solid-svg-icons'
import { NeBadge } from '../src/main'
import { faXmark } from '@fortawesome/free-solid-svg-icons'
import { faHeart } from '@fortawesome/free-solid-svg-icons/faHeart'

const meta: Meta<typeof NeBadge> = {
title: 'Visual/NeBadge',
Expand Down Expand Up @@ -63,7 +66,7 @@ export const WithLabel: StoryObj<typeof NeBadge> = {
args: {
size: 'sm',
kind: 'primary',
rounded: false,
rounded: true,
text: "Where's the label?",
label: "Here's the label!",
icon: undefined,
Expand Down

0 comments on commit 552cc14

Please sign in to comment.