Skip to content

Commit

Permalink
doc: add phosphor icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jul 10, 2024
1 parent 0525e39 commit 4c8d376
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
93 changes: 93 additions & 0 deletions stories/murmur/components/PhosphorIcon.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { PhosphorIcon } from '@/components'

export default {
title: 'Murmur/Components/PhosphorIcon',
tags: ['autodocs'],
component: PhosphorIcon,
argTypes: {
variant: {
control: { type: 'select' },
options: ['primary', 'secondary', 'tertiary', 'body-color']
},
weight: {
control: { type: 'select' },
options: ['thin', 'light', 'regular', 'bold', 'fill', 'duotone']
},
spin: {
control: { type: 'boolean' }
}
},
args: {
weight: 'regular',
spin: false,
spinDuration: '1s'
},
render: (args) => ({
components: {
PhosphorIcon
},
setup() {
return {
args
}
},
template: `
<phosphor-icon v-bind="args"/>
`
})
}

export const Default = {
args: {
name: 'User',
size: '32px'
}
}

export const WeightBold = {
args: {
name: 'User',
weight: 'bold',
size: '32px'
}
}

export const WeightFill = {
args: {
name: 'User',
weight: 'fill',
size: '32px'
}
}

export const WeightDuotone = {
args: {
name: 'User',
weight: 'duotone',
size: '32px'
}
}

export const Spinning = {
args: {
name: 'circle-notch',
size: '32px',
spin: true
}
}

export const VariantPrimary = {
args: {
name: 'rocket',
variant: 'primary',
size: '32px'
}
}

export const VariantSecondary = {
args: {
name: 'rocket',
variant: 'secondary',
size: '32px'
}
}
37 changes: 37 additions & 0 deletions stories/murmur/components/PhosphorIconLayers.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { PhosphorIcon, PhosphorIconLayers } from '@/components'

export default {
title: 'Murmur/Components/PhosphorIconLayers',
tags: ['autodocs'],
components: PhosphorIconLayers,
argTypes: {
weight: {
control: { type: 'select' },
options: ['thin', 'light', 'regular', 'bold', 'fill', 'duotone']
}
},
args: {
weight: 'thin',
spin: false,
size: '32px'
},
render: (args) => ({
components: {
PhosphorIcon,
PhosphorIconLayers
},
setup() {
return {
args
}
},
template: `
<phosphor-icon-layers v-bind="args">
<phosphor-icon name="circle" v-bind="args" beat fade />
<phosphor-icon name="star" size="1.2em" variant="warning" spin-reverse spin-duration="2s" fill />
</phosphor-icon-layers>
`
})
}

export const Default = {}

0 comments on commit 4c8d376

Please sign in to comment.