mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 13:38:13 +08:00
Add the TextInput widget (#518)
* Separate out the number input from a generic field input * Add TextInput widget Co-authored-by: mfish33 <32677537+mfish33@users.noreply.github.com>
This commit is contained in:
co-authored by
mfish33
parent
d9fbcd0092
commit
99bf6c496f
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<LayoutRow class="radio-input">
|
||||
<button :class="{ active: index === selectedIndex }" v-for="(entry, index) in entries" :key="index" @click="handleEntryClick(entry)" :title="entry.tooltip">
|
||||
<button :class="{ active: index === selectedIndex }" v-for="(entry, index) in entries" :key="index" @click="() => handleEntryClick(entry)" :title="entry.tooltip">
|
||||
<IconLabel v-if="entry.icon" :icon="entry.icon" />
|
||||
<TextLabel v-if="entry.label">{{ entry.label }}</TextLabel>
|
||||
</button>
|
||||
@@ -81,6 +81,7 @@ export interface RadioEntryData {
|
||||
export type RadioEntries = RadioEntryData[];
|
||||
|
||||
export default defineComponent({
|
||||
emits: ["update:selectedIndex"],
|
||||
props: {
|
||||
entries: { type: Array as PropType<RadioEntries>, required: true },
|
||||
selectedIndex: { type: Number as PropType<number>, required: true },
|
||||
|
||||
Reference in New Issue
Block a user