mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 21:14:18 +00:00
16 lines
475 B
JavaScript
16 lines
475 B
JavaScript
|
import React, {useContext} from "react"
|
||
|
import Select from "./Select"
|
||
|
import ContextTheme from "../contexts/ContextTheme"
|
||
|
|
||
|
|
||
|
export default function SelectTheme({ children, ...props }) {
|
||
|
const [theme, setTheme] = useContext(ContextTheme);
|
||
|
|
||
|
return (
|
||
|
<Select value={theme} onChange={e => setTheme(e.target.value)} {...props}>
|
||
|
<option value={"ThemeDark"}>Dark</option>
|
||
|
<option value={"ThemeLight"}>Light</option>
|
||
|
</Select>
|
||
|
)
|
||
|
}
|