import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { Theme } from '@shlinkio/shlink-frontend-kit'; import { changeThemeInMarkup, SimpleCard, ToggleSwitch } from '@shlinkio/shlink-frontend-kit'; import type { Settings, UiSettings } from '@shlinkio/shlink-web-component'; import type { FC } from 'react'; 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. );