File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -13,17 +13,23 @@ import icons, { DEPRECATED_ICONS } from '../components/icons'
1313 }}
1414/>
1515
16+ export const toKebabCase = str => str .replace (/ ([a-z ] )([A-Z ] )/ g , ' $1-$2' ).toLowerCase ()
17+
1618export const Template = args => ({
1719 components: { AIcon },
1820 setup() {
19- return { args , icons , DEPRECATED_ICONS }
21+ const getIconId = name => ` ${toKebabCase (name )}-${args .size } `
22+ return { args , icons , DEPRECATED_ICONS , getIconId }
2023 },
2124 template: `
22- <div class="grid grid-cols-5">
23- <div class="m-4 flex items-center text-navy w-max" v-for="(icon, name) in icons.${args .size }">
24- <a-icon :size="args.size" :name="name" />
25- <span class="ml-3 body-md">{{name}}</span>
26- <span v-if="DEPRECATED_ICONS[args.size].includes(name)" class="text-error body-xs-600 mx-1">(deprecated)</span>
25+ <div class="grid grid-cols-4">
26+ <div class="m-4 flex flex-col text-navy" v-for="(icon, name) in icons.${args .size }">
27+ <div class="flex items-center">
28+ <a-icon :size="args.size" :name="name" />
29+ <span class="ml-3 body-md">{{name}}</span>
30+ <span v-if="DEPRECATED_ICONS[args.size].includes(name)" class="text-error body-xs-600 mx-1">(deprecated)</span>
31+ </div>
32+ <code class="text-xs text-warsaw mt-1">{{getIconId(name)}}</code>
2733 </div>
2834 </div>
2935 `
You can’t perform that action at this time.
0 commit comments