-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Dropdown): keep options inside the viewport and hide them on outs…
…ide scroll
- Loading branch information
1 parent
208f886
commit 34b3eda
Showing
6 changed files
with
347 additions
and
28 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
146 changes: 146 additions & 0 deletions
146
src/components/inputs/Dropdown/__snapshots__/Dropdown.stories.storyshot
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,146 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Dropdown/Scroll Example Scroll 1`] = ` | ||
Array [ | ||
<div | ||
style={ | ||
Object { | ||
"border": "1px solid red", | ||
"height": "300px", | ||
} | ||
} | ||
> | ||
<input | ||
type="text" | ||
/> | ||
<div | ||
style={ | ||
Object { | ||
"background": "red", | ||
"height": "100px", | ||
"width": "100%", | ||
} | ||
} | ||
/> | ||
<label | ||
className="wxc wxc-label wxc wxc-dropdown" | ||
> | ||
<div | ||
className="wxc-label__control" | ||
> | ||
<div | ||
className="wxc-dropdown__control" | ||
disabled={false} | ||
> | ||
<div | ||
aria-label="undefined" | ||
className="wxc-dropdown__selected-option " | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
role="button" | ||
tabIndex={0} | ||
> | ||
<span | ||
className="wxc-dropdown__label" | ||
/> | ||
<svg | ||
className="wxc-icon " | ||
height={13} | ||
style={Object {}} | ||
viewBox="0 0 26 14" | ||
width={13} | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M25.7075 0.293202C25.52 0.105701 25.2656 0.000366211 25.0004 0.000366211C24.7353 0.000366211 24.4809 0.105701 24.2934 0.293202L13 11.5862L1.70699 0.293202C1.51851 0.110381 1.26568 0.00902984 1.0031 0.0110359C0.740528 0.013042 0.489278 0.118244 0.303611 0.303925C0.117943 0.489605 0.0127584 0.740862 0.0107709 1.00344C0.00878336 1.26601 0.110153 1.51883 0.292988 1.7073L12.293 13.7073C12.4805 13.8948 12.7348 14.0001 13 14.0001C13.2652 14.0001 13.5195 13.8948 13.707 13.7073L25.707 1.7073C25.8946 1.51984 26 1.26555 26.0001 1.00036C26.0002 0.735168 25.8949 0.4808 25.7075 0.293202Z" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
</label> | ||
</div>, | ||
<video | ||
autoPlay={true} | ||
height="0" | ||
id="remote-video" | ||
loop={true} | ||
muted={true} | ||
playsInline={true} | ||
src="./video/ongoing-meeting.mp4" | ||
width="0" | ||
/>, | ||
<video | ||
autoPlay={true} | ||
height="0" | ||
id="remote-share" | ||
loop={true} | ||
muted={true} | ||
playsInline={true} | ||
src="./video/ongoing-share.mp4" | ||
width="0" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`Storyshots Dropdown/Scroll Example Select Example 1`] = ` | ||
Array [ | ||
<label | ||
className="wxc wxc-label wxc wxc-dropdown" | ||
> | ||
<div | ||
className="wxc-label__control" | ||
> | ||
<div | ||
className="wxc-dropdown__control" | ||
disabled={false} | ||
> | ||
<div | ||
aria-label="undefined" | ||
className="wxc-dropdown__selected-option " | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
role="button" | ||
tabIndex={0} | ||
> | ||
<span | ||
className="wxc-dropdown__label" | ||
/> | ||
<svg | ||
className="wxc-icon " | ||
height={13} | ||
style={Object {}} | ||
viewBox="0 0 26 14" | ||
width={13} | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M25.7075 0.293202C25.52 0.105701 25.2656 0.000366211 25.0004 0.000366211C24.7353 0.000366211 24.4809 0.105701 24.2934 0.293202L13 11.5862L1.70699 0.293202C1.51851 0.110381 1.26568 0.00902984 1.0031 0.0110359C0.740528 0.013042 0.489278 0.118244 0.303611 0.303925C0.117943 0.489605 0.0127584 0.740862 0.0107709 1.00344C0.00878336 1.26601 0.110153 1.51883 0.292988 1.7073L12.293 13.7073C12.4805 13.8948 12.7348 14.0001 13 14.0001C13.2652 14.0001 13.5195 13.8948 13.707 13.7073L25.707 1.7073C25.8946 1.51984 26 1.26555 26.0001 1.00036C26.0002 0.735168 25.8949 0.4808 25.7075 0.293202Z" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
</div> | ||
</label>, | ||
<video | ||
autoPlay={true} | ||
height="0" | ||
id="remote-video" | ||
loop={true} | ||
muted={true} | ||
playsInline={true} | ||
src="./video/ongoing-meeting.mp4" | ||
width="0" | ||
/>, | ||
<video | ||
autoPlay={true} | ||
height="0" | ||
id="remote-share" | ||
loop={true} | ||
muted={true} | ||
playsInline={true} | ||
src="./video/ongoing-share.mp4" | ||
width="0" | ||
/>, | ||
] | ||
`; |
Oops, something went wrong.