Use Warning icon for CWs in app settings

This commit is contained in:
Claire 2024-02-23 19:02:16 +01:00
parent e62cd93650
commit e333453343
3 changed files with 7 additions and 13 deletions

View file

@ -10,9 +10,9 @@ import ExpandLessIcon from '@/material-icons/400-24px/expand_less.svg?react';
import ImageIcon from '@/material-icons/400-24px/image.svg?react';
import ManufacturingIcon from '@/material-icons/400-24px/manufacturing.svg?react';
import SettingsIcon from '@/material-icons/400-24px/settings-fill.svg?react';
import WarningIcon from '@/material-icons/400-24px/warning.svg?react';
import { preferencesLink } from 'flavours/glitch/utils/backend_links';
import LocalSettingsNavigationItem from './item';
const messages = defineMessages({
@ -60,7 +60,8 @@ class LocalSettingsNavigation extends PureComponent {
active={index === 2}
index={2}
onNavigate={onNavigate}
textIcon='CW'
icon='warning'
iconComponent={WarningIcon}
title={intl.formatMessage(messages.content_warnings)}
/>
<LocalSettingsNavigationItem

View file

@ -13,7 +13,6 @@ export default class LocalSettingsPage extends PureComponent {
className: PropTypes.string,
href: PropTypes.string,
icon: PropTypes.string,
textIcon: PropTypes.string,
iconComponent: PropTypes.func,
index: PropTypes.number.isRequired,
onNavigate: PropTypes.func,
@ -36,7 +35,6 @@ export default class LocalSettingsPage extends PureComponent {
href,
icon,
iconComponent,
textIcon,
onNavigate,
title,
} = this.props;
@ -45,7 +43,7 @@ export default class LocalSettingsPage extends PureComponent {
active,
}, className);
const iconElem = icon ? <Icon id={icon} icon={iconComponent} /> : (textIcon ? <span className='text-icon-button'>{textIcon}</span> : null);
const iconElem = icon ? <Icon id={icon} icon={iconComponent} /> : null;
if (href) return (
<a

View file

@ -299,21 +299,16 @@
}
}
.text-icon,
.text-icon-button {
font-weight: 600;
font-size: 11px;
line-height: 27px;
cursor: default;
}
.text-icon-button {
color: $lighter-text-color;
border: 0;
border-radius: 4px;
background: transparent;
cursor: pointer;
font-weight: 600;
font-size: 11px;
padding: 0 3px;
line-height: 27px;
white-space: nowrap;
&:hover,