Skip to content

Commit

Permalink
Merge pull request #2019 from oasisprotocol/lw/theme-switcher-size
Browse files Browse the repository at this point in the history
Fix theme switcher icon size
  • Loading branch information
lukaw3d authored Jul 29, 2024
2 parents b2e126f + 3ab4c23 commit ed47771
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .changelog/2019.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix theme switcher icon size
10 changes: 5 additions & 5 deletions src/app/components/ThemeSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { getTargetTheme } from 'styles/theme/utils'

interface Props {}

const getThemesIcons = (t: TFunction) => ({
light: <Sun aria-label={t('theme.lightMode', 'Light mode')} size="24px" />,
dark: <Moon aria-label={t('theme.darkMode', 'Dark mode')} size="24px" />,
system: <System aria-label={t('theme.system', 'System')} size="24px" />,
const getThemesIcons = (t: TFunction, size?: string) => ({
light: <Sun aria-label={t('theme.lightMode', 'Light mode')} size={size} />,
dark: <Moon aria-label={t('theme.darkMode', 'Dark mode')} size={size} />,
system: <System aria-label={t('theme.system', 'System')} size={size} />,
})

export const ThemeSwitcher = memo((props: Props) => {
Expand Down Expand Up @@ -52,7 +52,7 @@ export const ThemeSelect = () => {
const { t } = useTranslation()
const theme = useSelector(selectTheme)
const dispatch = useDispatch()
const icons = getThemesIcons(t)
const icons = getThemesIcons(t, '24px')
const themeOptions: { value: 'dark' | 'light' | 'system'; label: string }[] = [
{
value: 'light',
Expand Down
5 changes: 4 additions & 1 deletion src/app/pages/StakingPage/Features/DelegationList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ export const DelegationList = memo((props: Props) => {
noHeader={true}
noDataComponent={
type === 'active'
? t('account.emptyActiveDelegationsList', 'There are currently no active delegations.')
? t(
'account.emptyActiveDelegationsList',
'There are currently no active delegations for this account.',
)
: t('account.emptyDebondingDelegationsList', 'There are no debonding delegations for this account.')
}
columns={columns}
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"delegate": "Delegate"
},
"addressCopied": "Address copied.",
"emptyActiveDelegationsList": "There are currently no active delegations.",
"emptyActiveDelegationsList": "There are currently no active delegations for this account.",
"emptyDebondingDelegationsList": "There are no debonding delegations for this account.",
"loading": "Loading account",
"loadingError": "Couldn't load account.",
Expand Down

0 comments on commit ed47771

Please sign in to comment.