Skip to content

Commit 6024b8f

Browse files
committed
added disable/enable buttons
1 parent 9d65096 commit 6024b8f

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

src/app/components/StateRoute/Ax.tsx

Whitespace-only changes.

src/app/components/StateRoute/StateRoute.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,27 @@ const StateRoute = (props: StateRouteProps) => {
125125
path='/accessibility'
126126
element={
127127
showTree ? (
128-
<ParentSize className='componentMapContainer'>
128+
<ParentSize className='componentMapContainer'>
129129
{({ width, height }) => {
130130
// eslint-disable-next-line react/prop-types
131131
const maxHeight: number = 1200;
132132
const h = Math.min(height, maxHeight);
133133
console.log('h: ', h);
134134
return (
135-
<AxTree
136-
axSnapshots={axSnapshots}
137-
snapshot={snapshot}
138-
snapshots={snapshots}
139-
currLocation={currLocation}
140-
width={width}
141-
height={h}
142-
/>
135+
<div>
136+
<input type="radio" value='enable' checked={selectedValue === 'enable'} /> <label htmlFor='enable'>Enable</label>
137+
<input type="radio" value='disable' checked={selectedValue === 'disable'} onChange={() => {
138+
disableAxTree(); }}/>
139+
<label htmlFor='disable'>Disable</label>
140+
<AxTree
141+
axSnapshots={axSnapshots}
142+
snapshot={snapshot}
143+
snapshots={snapshots}
144+
currLocation={currLocation}
145+
width={width}
146+
height={h}
147+
/>
148+
</div>
143149
);
144150
}}
145151
</ParentSize>

src/app/slices/mainSlice.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,5 +551,4 @@ export const {
551551
startReconnect,
552552
endConnect,
553553
toggleAxTree,
554-
toggleAxTree,
555554
} = mainSlice.actions;

0 commit comments

Comments
 (0)