Dark mode toggle in settings
This commit is contained in:
parent
5fa0370b86
commit
01a9b55b6a
5 changed files with 23 additions and 3 deletions
|
|
@ -49,6 +49,15 @@ const Settings = () => {
|
|||
value={store.timeFormat}
|
||||
onChange={value => store.setTimeFormat(value)}
|
||||
/>
|
||||
|
||||
<ToggleField
|
||||
label="Theme"
|
||||
name="theme"
|
||||
id="theme"
|
||||
options={['System', 'Light', 'Dark']}
|
||||
value={store.theme}
|
||||
onChange={value => store.setTheme(value)}
|
||||
/>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ export const Modal = styled.div`
|
|||
top: 70px;
|
||||
right: 12px;
|
||||
background-color: ${props => props.theme.background};
|
||||
border: 1px solid ${props => props.theme.primaryBackground};
|
||||
${props => props.theme.mode === 'dark' && `
|
||||
border: 1px solid ${props.theme.primaryBackground};
|
||||
`}
|
||||
z-index: 150;
|
||||
padding: 10px 18px;
|
||||
border-radius: 3px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue