From 30a71ac8b7a25dafa5b0ca54c3e7fa3f8ed12889 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 14 Feb 2022 20:28:28 +0100 Subject: [PATCH] Improved settings section names --- src/settings/Settings.tsx | 10 +++++----- src/settings/UserInterfaceSettings.tsx | 25 +++++++++++-------------- src/utils/NavPills.tsx | 4 ++-- src/visits/VisitsStats.tsx | 2 +- test/settings/Settings.test.tsx | 4 ++-- test/utils/NavPills.test.tsx | 10 +++++++--- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 8415763b..68c2b531 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -19,16 +19,16 @@ const Settings = ( ) => () => ( - App + General Short URLs - Others + Secondary items - , ]} />} /> + , ]} />} /> , ]} />} /> - , ]} />} /> - } /> + , ]} />} /> + } /> ); diff --git a/src/settings/UserInterfaceSettings.tsx b/src/settings/UserInterfaceSettings.tsx index cca9e11b..5ca2e462 100644 --- a/src/settings/UserInterfaceSettings.tsx +++ b/src/settings/UserInterfaceSettings.tsx @@ -1,7 +1,6 @@ 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'; @@ -15,19 +14,17 @@ interface UserInterfaceProps { export const UserInterfaceSettings: FC = ({ settings: { ui }, setUiSettings }) => ( - - - { - const theme: Theme = useDarkTheme ? 'dark' : 'light'; + + { + const theme: Theme = useDarkTheme ? 'dark' : 'light'; - setUiSettings({ ...ui, theme }); - changeThemeInMarkup(theme); - }} - > - Use dark theme. - - + setUiSettings({ ...ui, theme }); + changeThemeInMarkup(theme); + }} + > + Use dark theme. + ); diff --git a/src/utils/NavPills.tsx b/src/utils/NavPills.tsx index e00000c7..3d7c3e8e 100644 --- a/src/utils/NavPills.tsx +++ b/src/utils/NavPills.tsx @@ -14,9 +14,9 @@ export const NavPillItem: FC = ({ children, ...rest }) => ( ); -export const NavPills: FC = ({ children }) => ( +export const NavPills: FC<{ fill?: boolean }> = ({ children, fill = false }) => ( -