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