mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 10:08:11 +08:00
Clean up web code's use of display CSS properties, using <LayoutRow>/<LayoutCol> where intended
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div class="icon-label" :class="`size-${icons[icon].size}`">
|
||||
<LayoutRow class="icon-label" :class="`size-${icons[icon].size}`">
|
||||
<component :is="icon" />
|
||||
</div>
|
||||
</LayoutRow>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.icon-label {
|
||||
display: block;
|
||||
flex: 0 0 auto;
|
||||
fill: var(--color-e-nearwhite);
|
||||
|
||||
@@ -32,10 +31,11 @@ import { DefineComponent, defineComponent, PropType } from "vue";
|
||||
|
||||
import { IconName, IconSize, ICON_LIST } from "@/utilities/icons";
|
||||
|
||||
import LayoutRow from "@/components/layout/LayoutRow.vue";
|
||||
|
||||
const icons: Record<IconName, { component: DefineComponent; size: IconSize }> = ICON_LIST;
|
||||
|
||||
export default defineComponent({
|
||||
components: Object.fromEntries(Object.entries(icons).map(([name, data]) => [name, data.component])),
|
||||
props: {
|
||||
icon: { type: String as PropType<IconName>, required: true },
|
||||
gapAfter: { type: Boolean as PropType<boolean>, default: false },
|
||||
@@ -45,5 +45,9 @@ export default defineComponent({
|
||||
icons,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
LayoutRow,
|
||||
...Object.fromEntries(Object.entries(icons).map(([name, data]) => [name, data.component])),
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user