Skip to content

Commit

Permalink
show the state in the button text
Browse files Browse the repository at this point in the history
  • Loading branch information
jackTabsCode committed Dec 2, 2023
1 parent 3138a66 commit 12469f0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,28 @@ export function App() {
Size={new UDim2(1, 0, 0, ROW_HEIGHT)}
key="topRow"
>
<RowButton key="clear" onClick={() => store.clear()} order={0} text="Clear" />
<RowText order={1} text={`${actions.size()} dispatched`} />
<RowText order={0} text={`${actions.size()} dispatched`} />
<RowButton key="clear" onClick={() => store.clear()} order={1} text="Clear" />

<RowText order={2} text="•" />

<RowText order={3} text="Selection Mode" />
<RowButton
key="autoselect"
onClick={() => store.changeAutoSelectMode(!autoSelectLatest)}
order={3}
text="Toggle"
order={4}
text={autoSelectLatest ? "Auto" : "Manual"}
/>
<RowText order={4} text={`Selection Mode: ${autoSelectLatest ? "Auto" : "Manual"}`} />

<RowText order={5} text="•" />

<RowButton key="showargs" onClick={() => store.changeShowArgs(!showArgs)} order={6} text="Toggle" />
<RowText order={7} text={`Show Args: ${showArgs ? "Yes" : "No"}`} />
<RowText order={6} text="Show Arguments" />
<RowButton
key="showargs"
onClick={() => store.changeShowArgs(!showArgs)}
order={7}
text={showArgs ? "On" : "Off"}
/>

<uilistlayout
FillDirection={Enum.FillDirection.Horizontal}
Expand Down

0 comments on commit 12469f0

Please sign in to comment.