mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-19 11:39:36 +02:00
32 lines
871 B
TypeScript
32 lines
871 B
TypeScript
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>
|
|
);
|
|
};
|