-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move dark mode button to tip level settings instead of hiding it in t…
…he settings popover.
- Loading branch information
1 parent
4b1af36
commit 5b3998a
Showing
3 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import { Button as AntdButton, Tooltip } from 'antd' | ||
import styled from '@emotion/styled' | ||
|
||
const Button = styled(AntdButton)` | ||
width: 32px; | ||
padding: 0; | ||
` | ||
|
||
const DarkModeButton = ({ isDarkMode, ...props }) => { | ||
return ( | ||
<Tooltip placement="bottomLeft" title="Toggle Light/Dark Mode"> | ||
<Button {...props}>{isDarkMode ? '🌙' : '☀️'}</Button> | ||
</Tooltip> | ||
) | ||
} | ||
|
||
export { DarkModeButton } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters