Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evwilkin committed Feb 7, 2024
1 parent 574fd12 commit 0b898e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ const AppLayout: React.FunctionComponent<IAppLayout> = ({ children }) => {

const toggleDarkTheme = (_evt, selected) => {
const darkThemeToggleClicked = !selected === isDarkTheme;
document.querySelector('html').classList.toggle('pf-v5-theme-dark', darkThemeToggleClicked);
document.querySelector('html')!.classList.toggle('pf-v5-theme-dark', darkThemeToggleClicked);
setIsDarkTheme(darkThemeToggleClicked);
};

const toggleRTL = () => {
const html = document.querySelector('html');
const curDir = html.dir;
html.dir = curDir !== 'rtl' ? 'rtl' : 'ltr';
const curDir = html!.dir;
html!.dir = curDir !== 'rtl' ? 'rtl' : 'ltr';
};

const Header = (
Expand Down Expand Up @@ -108,7 +108,7 @@ const AppLayout: React.FunctionComponent<IAppLayout> = ({ children }) => {
<ToolbarGroup
className="pf-m-align-end"
align={{ default: 'alignRight' }}
spaceItems={{ default: 'spacerNone', md: 'spacerMd' }}
spaceItems={{ default: 'spaceItemsNone', md: 'spaceItemsMd' }}
>
<ToolbarItem>
<ToggleGroup aria-label="Dark theme toggle group">
Expand Down

0 comments on commit 0b898e8

Please sign in to comment.