-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Contextual VideoCard and VideoThumbnail components (#2725)
* Initial commit of adding the two components * Rewrote tests to follow Polaris test style * requested changes for easier diff viewing/copying * Renamed VideoCard to MediaCard * Edited documentation * Renamed media card variables * First doc edits from content session 1 * [MediaCard] Finished README; require children * [VideoThumbnail] finalized doc * add missing prop descriptions * fix into doc commit * [VideoThumbnail] Call onBeforeStartPlaying onFocus for keyboard supportted video preloading * [VideoThumbnail] Account for all combos of hours, mins, and secs * [VideoThumbnail] Fix test coverage * fix change log * lint 😑 * [MediaCard] remove Popover.preventAutofocus * little fixes Co-authored-by: Chloe Rice <chloe.rice@shopify.com>
- Loading branch information
1 parent
27842a6
commit fe8e046
Showing
18 changed files
with
1,297 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@import '../../styles/common'; | ||
|
||
$portrait-breakpoint: 804px; | ||
|
||
.MediaCard { | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
flex-flow: row wrap; | ||
|
||
&.portrait { | ||
flex-flow: column nowrap; | ||
} | ||
|
||
@include breakpoint-before($portrait-breakpoint, inclusive) { | ||
flex-flow: column nowrap; | ||
} | ||
} | ||
|
||
.MediaContainer { | ||
&:not(.portrait) { | ||
flex-basis: 40%; | ||
} | ||
} | ||
|
||
.InfoContainer { | ||
position: relative; | ||
|
||
&:not(.portrait) { | ||
flex-basis: 60%; | ||
} | ||
} | ||
|
||
.Popover { | ||
position: absolute; | ||
z-index: z-index(overlay); | ||
top: spacing(); | ||
right: spacing(); | ||
} | ||
|
||
.Heading { | ||
margin-right: spacing(extra-loose); | ||
} | ||
|
||
.PrimaryAction { | ||
margin-right: spacing(tight); | ||
} | ||
|
||
.SecondaryAction { | ||
margin-left: -spacing(tight); | ||
} | ||
|
||
.ActionContainer { | ||
padding-top: spacing(tight); | ||
|
||
&.portrait { | ||
padding-top: spacing(extra-loose); | ||
} | ||
|
||
@include breakpoint-before($portrait-breakpoint, inclusive) { | ||
padding-top: spacing(extra-loose); | ||
} | ||
} |
Oops, something went wrong.