mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-18 07:48:02 +08:00
Many large changes, including:
- TypeScript enums are now string unions throughout
- Strong type-checking throughout the TS and Vue codebase
- Vue component props now all specify `as PropType<...>`
- Usage of annotated return types on all functions
- Sorting of JS import statements
- Explicit usage of Vue bind attribute function call arguments (`@click="foo"` is now `@click=(e) => foo(e)`)
- Much improved code quality related to the color picker
- Consistent camelCase Vue bind and v-model attributes
- Consistent Vue HTML attribute strings with single quotes
- Bug fix and clarity improvement with incorrect hint class parameters
- Empty Vue component objects like `props: {}` and `components: {}` removed
32 lines
522 B
Vue
32 lines
522 B
Vue
<template>
|
|
<span class="text-label" :class="{ bold, italic }">
|
|
<slot></slot>
|
|
</span>
|
|
</template>
|
|
|
|
<style lang="scss">
|
|
.text-label {
|
|
white-space: nowrap;
|
|
line-height: 18px;
|
|
|
|
&.bold {
|
|
font-weight: 700;
|
|
}
|
|
|
|
&.italic {
|
|
font-style: italic;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, PropType } from "vue";
|
|
|
|
export default defineComponent({
|
|
props: {
|
|
bold: { type: Boolean as PropType<boolean>, default: false },
|
|
italic: { type: Boolean as PropType<boolean>, default: false },
|
|
},
|
|
});
|
|
</script>
|