Skip to content

Commit

Permalink
Update tw-theme-accent.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyMakesThings authored Jun 1, 2024
1 parent 34fa294 commit f93404c
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions src/components/menu-bar/tw-theme-accent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ import {connect} from 'react-redux';
import check from './check.svg';
import dropdownCaret from './dropdown-caret.svg';
import {MenuItem, Submenu} from '../menu/menu.jsx';
import {ACCENT_BLUE, ACCENT_MAP, ACCENT_PURPLE, ACCENT_RED, Theme} from '../../lib/themes/index.js';
import {ACCENT_BLUE, ACCENT_MAP, ACCENT_PURPLE, ACCENT_RAINBOW, ACCENT_RED, Theme} from '../../lib/themes/index.js';
import {openAccentMenu, accentMenuOpen, closeSettingsMenu} from '../../reducers/menus.js';
import {setTheme} from '../../reducers/theme.js';
import {persistTheme} from '../../lib/themes/themePersistance.js';
import styles from './settings-menu.css';

import prideIcon from './tw-accent-pride.svg';

const options = defineMessages({
[ACCENT_RED]: {
defaultMessage: 'Pride',
description: 'Name of the pride color scheme.',
id: 'tw.accent.pride'
},
[ACCENT_RED]: {
defaultMessage: 'Red',
description: 'Name of the red color scheme, used by TurboWarp by default.',
Expand All @@ -31,14 +38,29 @@ const options = defineMessages({
}
});

const ColorIcon = props => (
<div
className={styles.accentIconOuter}
style={{
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary']
}}
/>
);
const icons = {
[ACCENT_RAINBOW]: prideIcon,
};

const ColorIcon = props => {
if (icons[props.id]) {
return (
<img
src={icons[props.id]}
draggable={false}
width={24}
/>
)
}
return (
<div
className={styles.accentIconOuter}
style={{
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary']
}}
/>
)
};

ColorIcon.propTypes = {
id: PropTypes.string
Expand Down

0 comments on commit f93404c

Please sign in to comment.