Skip to content

Commit

Permalink
fix: update ThemeProvider children type to be used with conditional r…
Browse files Browse the repository at this point in the history
…endering (#1067)

* fix: update ThemeProvider children type to be used with conditional rendering

* fix: remove default label
  • Loading branch information
spaenleh authored Sep 30, 2024
1 parent 609ea8c commit 5794e9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ThemeContext/LanguageSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const LanguageSelect = ({
setDirection,
languageSelectSx,
langs,
label = 'Language',
label,
size,
variant,
}: {
Expand Down
11 changes: 9 additions & 2 deletions src/ThemeContext/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import {
SxProps,
} from '@mui/material';

import { createContext, useContext, useEffect, useMemo, useState } from 'react';
import {
ReactNode,
createContext,
useContext,
useEffect,
useMemo,
useState,
} from 'react';

import rtlPlugin from '@graasp/stylis-plugin-rtl';

Expand All @@ -18,7 +25,7 @@ import { I18nInstance } from '../types.js';
import LanguageSelect from './LanguageSelect.js';

type Props = {
children: JSX.Element | JSX.Element[];
children: ReactNode;
i18n: I18nInstance;
langs: { [key: string]: string };
languageSelectSx: SxProps;
Expand Down

0 comments on commit 5794e9e

Please sign in to comment.