Skip to content

Commit

Permalink
fix: invert colors for mobile platform switch (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia authored Mar 7, 2024
1 parent 1ecb98e commit dcfd9da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Platform,
PlatformSwitch,
defaultHostsMapper,
useMobileView,
usePlatformNavigation,
} from '@graasp/ui';

Expand Down Expand Up @@ -48,6 +49,7 @@ type Props = { children: JSX.Element | (JSX.Element & string) };
const Main = ({ children }: Props): JSX.Element => {
const { t } = useBuilderTranslation();
const theme = useTheme();
const { isMobile } = useMobileView();

const itemId = useParams()[ITEM_ID_PARAMS];

Expand Down Expand Up @@ -90,8 +92,12 @@ const Main = ({ children }: Props): JSX.Element => {
id={APP_NAVIGATION_PLATFORM_SWITCH_ID}
selected={Platform.Builder}
platformsProps={platformProps}
color={theme.palette.primary.main}
accentColor={theme.palette.secondary.main}
color={
isMobile ? theme.palette.primary.main : theme.palette.secondary.main
}
accentColor={
isMobile ? theme.palette.secondary.main : theme.palette.primary.main
}
/>
}
>
Expand Down

0 comments on commit dcfd9da

Please sign in to comment.