Skip to content

Commit

Permalink
fix: mode list
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardocasares committed Oct 31, 2020
1 parent ba1d675 commit 3eda767
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/components/Button/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import styled from "@emotion/styled";

export const GhostButton = styled.button`
text-align: left;
border: none;
background: transparent;
appearance: none;
color: var(--foreground);
padding: 0;
margin: 0;
line-height: 0;
display: block;
width: 100%;
font-size: var(--sz4);
`;
11 changes: 5 additions & 6 deletions src/pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ export const Settings = () => {
>
{["dark", "light", "system"].map((mode) => (
<li key={mode}>
<ToggleItem>
{mode}
<GhostButton onClick={() => setTheme(mode)}>
<RightLeftToggle active={theme === mode} />
</GhostButton>
</ToggleItem>
<GhostButton onClick={() => setTheme(mode)}>
<ToggleItem>
{mode} <RightLeftToggle active={theme === mode} />
</ToggleItem>
</GhostButton>
</li>
))}
</Stack>
Expand Down

0 comments on commit 3eda767

Please sign in to comment.