Skip to content

Commit 12469f0

Browse files
committed
show the state in the button text
1 parent 3138a66 commit 12469f0

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/app/index.tsx

+12-7
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,28 @@ export function App() {
4343
Size={new UDim2(1, 0, 0, ROW_HEIGHT)}
4444
key="topRow"
4545
>
46-
<RowButton key="clear" onClick={() => store.clear()} order={0} text="Clear" />
47-
<RowText order={1} text={`${actions.size()} dispatched`} />
46+
<RowText order={0} text={`${actions.size()} dispatched`} />
47+
<RowButton key="clear" onClick={() => store.clear()} order={1} text="Clear" />
4848

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

51+
<RowText order={3} text="Selection Mode" />
5152
<RowButton
5253
key="autoselect"
5354
onClick={() => store.changeAutoSelectMode(!autoSelectLatest)}
54-
order={3}
55-
text="Toggle"
55+
order={4}
56+
text={autoSelectLatest ? "Auto" : "Manual"}
5657
/>
57-
<RowText order={4} text={`Selection Mode: ${autoSelectLatest ? "Auto" : "Manual"}`} />
5858

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

61-
<RowButton key="showargs" onClick={() => store.changeShowArgs(!showArgs)} order={6} text="Toggle" />
62-
<RowText order={7} text={`Show Args: ${showArgs ? "Yes" : "No"}`} />
61+
<RowText order={6} text="Show Arguments" />
62+
<RowButton
63+
key="showargs"
64+
onClick={() => store.changeShowArgs(!showArgs)}
65+
order={7}
66+
text={showArgs ? "On" : "Off"}
67+
/>
6368

6469
<uilistlayout
6570
FillDirection={Enum.FillDirection.Horizontal}

0 commit comments

Comments
 (0)