fix ActionSelect stateless, add value prop
This commit is contained in:
@@ -53,10 +53,23 @@
|
||||
<div class="component">
|
||||
<p class="title">Button Select</p>
|
||||
|
||||
<ActionSelect
|
||||
label="Action"
|
||||
options={[{ title: 'Yeet' }, { title: 'Yote' }, { title: 'Yote and Yeet' }]}
|
||||
/>
|
||||
<div class="flex gap-2">
|
||||
<ActionSelect
|
||||
class="basis-1/2"
|
||||
stateless
|
||||
label="Stateless Action"
|
||||
options={[{ title: 'Yeet' }, { title: 'Yote' }, { title: 'Yote and Yeet' }]}
|
||||
/>
|
||||
<ActionSelect
|
||||
class="basis-1/2"
|
||||
label="Stateful Action"
|
||||
value={{ title: 'Initial Action', onchoose: (value) => console.log('Chosen:', value) }}
|
||||
options={[
|
||||
{ title: 'Action 1', onchoose: (value) => console.log('Action 1 chosen:', value) },
|
||||
{ title: 'Action 2', onchoose: (value) => console.log('Action 2 chosen:', value) }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="component">
|
||||
|
||||
Reference in New Issue
Block a user