import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { Theme } from '@shlinkio/shlink-frontend-kit'; import { SimpleCard, ToggleSwitch } from '@shlinkio/shlink-frontend-kit'; import type { FC } from 'react'; import type { AppSettings, UiSettings } from './reducers/settings'; import './UserInterfaceSettings.scss'; interface UserInterfaceProps { settings: AppSettings; setUiSettings: (settings: UiSettings) => void; } export const UserInterfaceSettings: FC = ({ settings: { ui }, setUiSettings }) => ( { const theme: Theme = useDarkTheme ? 'dark' : 'light'; setUiSettings({ ...ui, theme }); }} > Use dark theme. );