-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from fyndiq/dropdown-fixes
Dropdown fixes and features
- Loading branch information
Showing
17 changed files
with
777 additions
and
44 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
129 changes: 129 additions & 0 deletions
129
packages/fyndiq-component-dropdown/src/__snapshots__/index.test.js.snap
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,129 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`fyndiq-component-dropdown should be closable by pressing the Escape key 1`] = `""`; | ||
|
||
exports[`fyndiq-component-dropdown should be closed when clicking outside 1`] = `""`; | ||
|
||
exports[`fyndiq-component-dropdown should be displayed with minimum props 1`] = ` | ||
<div | ||
className="wrapper" | ||
onMouseOut={[Function]} | ||
onMouseOver={[Function]} | ||
> | ||
<div | ||
onClick={[Function]} | ||
> | ||
<Button | ||
disabled={false} | ||
horizontal={false} | ||
onClick={[Function]} | ||
pressed={false} | ||
size="s" | ||
type="normal" | ||
> | ||
Button | ||
<Arrow | ||
className="" | ||
orientation="down" | ||
/> | ||
</Button> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should be opened when clicked on the button 1`] = ` | ||
<div | ||
className=" | ||
dropdownWrapper | ||
dropdownDefault | ||
position-bl | ||
" | ||
style={ | ||
Object { | ||
"left": 0, | ||
"top": 5, | ||
} | ||
} | ||
> | ||
Value | ||
</div> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should be opened when hovered, if in hoverMode 1`] = ` | ||
<div | ||
className=" | ||
dropdownWrapper | ||
dropdownDefault | ||
position-bl | ||
" | ||
style={ | ||
Object { | ||
"left": 0, | ||
"top": 5, | ||
} | ||
} | ||
> | ||
Value | ||
</div> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should be opened when hovered, if in hoverMode 2`] = `""`; | ||
|
||
exports[`fyndiq-component-dropdown should have a custom button 1`] = ` | ||
<div | ||
className="wrapper" | ||
onMouseOut={[Function]} | ||
onMouseOver={[Function]} | ||
> | ||
<div | ||
onClick={[Function]} | ||
> | ||
<div> | ||
Hello | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should have a custom wrapper 1`] = ` | ||
<div | ||
className=" | ||
dropdownWrapper | ||
position-bl | ||
" | ||
style={ | ||
Object { | ||
"left": 0, | ||
"top": 0, | ||
} | ||
} | ||
> | ||
Content | ||
</div> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should have an arrow oriented to the top if dropdown is above 1`] = ` | ||
<Arrow | ||
className="" | ||
orientation="up" | ||
/> | ||
`; | ||
|
||
exports[`fyndiq-component-dropdown should have different dropdown positions 1`] = ` | ||
<div | ||
className=" | ||
dropdownWrapper | ||
dropdownDefault | ||
position-bc | ||
" | ||
style={ | ||
Object { | ||
"left": 0, | ||
"top": 0, | ||
} | ||
} | ||
> | ||
Content | ||
</div> | ||
`; |
Oops, something went wrong.