import { FC } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSun, faMoon } from '@fortawesome/free-solid-svg-icons'; import { FormGroup } from 'reactstrap'; import { SimpleCard } from '../utils/SimpleCard'; import ToggleSwitch from '../utils/ToggleSwitch'; import { changeThemeInMarkup, Theme } from '../utils/theme'; import { Settings, UiSettings } from './reducers/settings'; import './UserInterface.scss'; interface UserInterfaceProps { settings: Settings; setUiSettings: (settings: UiSettings) => void; } export const UserInterface: FC = ({ settings: { ui }, setUiSettings }) => ( { const theme: Theme = useDarkTheme ? 'dark' : 'light'; setUiSettings({ ...ui, theme }); changeThemeInMarkup(theme); }} > Use dark theme. );