-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a36f9f9
commit 384adec
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Meta } from "@storybook/blocks"; | ||
import { UnstyledWithTheme } from "../../components/UnstyledWithTheme"; | ||
import EditIcon from '../../icons/EditIcon.svg'; | ||
import RemoveIcon from '../../icons/RemoveIcon.svg'; | ||
|
||
<Meta title="Components/Menu" /> | ||
|
||
# Menu | ||
|
||
<UnstyledWithTheme> | ||
<div className="menu"> | ||
<div className="menu-item"><EditIcon width="14" height="auto" />Edit Transfer</div> | ||
<div className="menu-item menu-item-danger"><RemoveIcon width="14" height="auto" />Remove Transaction</div> | ||
</div> | ||
</UnstyledWithTheme> |
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,56 @@ | ||
:root { | ||
--menu-background: var(--white); | ||
--menu-border: var(--neutral-1); | ||
--menu-item-color: var(--neutral-8); | ||
--menu-item-background-on-hover: var(--neutral-0); | ||
--menu-item-danger-color: rgb(219 31 31); | ||
--menu-item-danger-background-on-hover: rgb(255 0 0 / 10%); | ||
} | ||
|
||
.dark-theme { | ||
--menu-background: var(--neutral-8); | ||
--menu-border: var(--neutral-7); | ||
--menu-item-color: var(--neutral-1); | ||
--menu-item-background-on-hover: var(--neutral-7); | ||
--menu-item-danger-color: rgb(219 31 31); | ||
--menu-item-danger-background-on-hover: rgb(255 0 0 / 10%); | ||
} | ||
|
||
.menu { | ||
--menu-item-padding: var(--space-3); | ||
--menu-item-corner-radius: var(--corner-5); | ||
|
||
z-index: 100; | ||
|
||
width: max-content; | ||
padding: var(--menu-item-padding); | ||
|
||
background: var(--menu-background); | ||
border: 1px solid var(--menu-border); | ||
border-radius: var(--menu-item-corner-radius); | ||
} | ||
|
||
.menu-item { | ||
cursor: pointer; | ||
|
||
display: flex; | ||
gap: 8px; | ||
align-items: center; | ||
|
||
padding: var(--space-5); | ||
|
||
color: var(--menu-item-color); | ||
} | ||
|
||
.menu-item:hover, | ||
.menu-item:focus { | ||
background: var(--menu-item-background-on-hover); | ||
border-radius: calc( | ||
var(--menu-item-corner-radius) - var(--menu-item-padding) | ||
); | ||
} | ||
|
||
.menu-item-danger { | ||
--menu-item-color: var(--menu-item-danger-color); | ||
--menu-item-background-on-hover: var(--menu-item-danger-background-on-hover); | ||
} |
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