Skip to content

Commit

Permalink
rename handleTheme to handleChangeTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Apr 15, 2023
1 parent e3dd088 commit 60f266a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/graphiql/src/components/GraphiQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
[editorContext],
);

const handleTheme: MouseEventHandler<HTMLButtonElement> = useCallback(
const handleChangeTheme: MouseEventHandler<HTMLButtonElement> = useCallback(
event => {
const selectedTheme = event.currentTarget.dataset.theme as
| 'light'
Expand Down Expand Up @@ -865,23 +865,23 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
<Button
type="button"
className={theme === null ? 'active' : ''}
onClick={handleTheme}
onClick={handleChangeTheme}
>
System
</Button>
<Button
type="button"
className={theme === 'light' ? 'active' : ''}
data-theme="light"
onClick={handleTheme}
onClick={handleChangeTheme}
>
Light
</Button>
<Button
type="button"
className={theme === 'dark' ? 'active' : ''}
data-theme="dark"
onClick={handleTheme}
onClick={handleChangeTheme}
>
Dark
</Button>
Expand Down

0 comments on commit 60f266a

Please sign in to comment.