You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
783 B
26 lines
783 B
import React, {useContext, useEffect} from "react";
|
|
import {Page} from "../primitives/Layout";
|
|
import DataContext from "../contexts/DataContext";
|
|
import {IconElement} from "../primitives/Elements";
|
|
import DialogContext from "../contexts/DialogContext";
|
|
import {DialogType} from "../models/Dialog";
|
|
|
|
const SettingsPage: React.FC = () => {
|
|
const {setDialog} = useContext(DialogContext);
|
|
const {colorPresets} = useContext(DataContext);
|
|
|
|
useEffect(() => {
|
|
}, []);
|
|
|
|
return (
|
|
<Page title="Oppsett">
|
|
<h1>Definerte farger</h1>
|
|
{colorPresets.map(cp => (
|
|
<IconElement key={cp.id} color={cp.value} caption={cp.name}/>
|
|
))}
|
|
<button onClick={() => setDialog({type: DialogType.AddColor})}>Add</button>
|
|
</Page>
|
|
);
|
|
};
|
|
|
|
export default SettingsPage;
|