mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-27 23:09:35 +02:00
Moved Themer to Settings. Added option to set default theme
This commit is contained in:
parent
426766225b
commit
e2285e2deb
20 changed files with 156 additions and 54 deletions
32
client/src/components/Settings/Themer/ThemePreview.tsx
Normal file
32
client/src/components/Settings/Themer/ThemePreview.tsx
Normal file
|
@ -0,0 +1,32 @@
|
|||
import { Theme } from '../../../interfaces/Theme';
|
||||
import classes from './ThemePreview.module.css';
|
||||
|
||||
interface Props {
|
||||
theme: Theme;
|
||||
applyTheme: Function;
|
||||
}
|
||||
|
||||
export const ThemePreview = (props: Props): JSX.Element => {
|
||||
return (
|
||||
<div
|
||||
className={classes.ThemePreview}
|
||||
onClick={() => props.applyTheme(props.theme.name)}
|
||||
>
|
||||
<div className={classes.ColorsPreview}>
|
||||
<div
|
||||
className={classes.ColorPreview}
|
||||
style={{ backgroundColor: props.theme.colors.background }}
|
||||
></div>
|
||||
<div
|
||||
className={classes.ColorPreview}
|
||||
style={{ backgroundColor: props.theme.colors.primary }}
|
||||
></div>
|
||||
<div
|
||||
className={classes.ColorPreview}
|
||||
style={{ backgroundColor: props.theme.colors.accent }}
|
||||
></div>
|
||||
</div>
|
||||
<p>{props.theme.name}</p>
|
||||
</div>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue