Skip to content

Commit

Permalink
chore: add colors story
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed Feb 10, 2025
1 parent cbb4028 commit 3a7766e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/ui/src/composables/useColors.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineStory } from '../../.storybook/types'
import { useColors } from './useColors'

export default {
title: 'composables/useColors',
}

export const Colors = defineStory({
story: () => ({
setup () {
const { colors, getTextColor, getColor } = useColors()

return {
colors,
getColor,
getTextColor,
}
},

template: `
<div class="flex flex-wrap gap-2">
<div v-for="color, colorName in colors" :style="{ backgroundColor: color, color: getColor(getTextColor(color)) }" class="p-4">
{{ colorName }}: {{ color }}
</div>
</div>
`,
}),
})

0 comments on commit 3a7766e

Please sign in to comment.