-
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
43b92a3
commit f9debe3
Showing
10 changed files
with
72 additions
and
62 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
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
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
|
||
import { StyleProps, styleComposition } from '../utils/styles' | ||
import { withProperties } from '../utils' | ||
|
||
import { MenuItem } from './MenuItem' | ||
|
||
import styled from 'styled-components' | ||
|
||
export interface MenuProps extends StyleProps { } | ||
export interface MenuProps extends StyleProps {} | ||
|
||
const Menu = styled.div<MenuProps>` | ||
const MenuWrapper = styled.div<MenuProps>` | ||
${styleComposition} | ||
position: absolute; | ||
z-index: 999; | ||
min-width: 160px; | ||
background-color: #f9f9f9; | ||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); | ||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); | ||
` | ||
|
||
const Menu = withProperties(MenuWrapper, { Item: MenuItem }) | ||
|
||
export { Menu } |
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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './Menu' | ||
export * from './MenuItem' |
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 @@ | ||
export * from './typeHelper' |
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,6 @@ | ||
export function withProperties<A, B>(component: A, properties: B): A & B { | ||
Object.keys(properties).forEach((key) => { | ||
component[key] = properties[key] | ||
}) | ||
return component as A & B | ||
} |