-
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.
Add a frame component for the player
- Loading branch information
1 parent
c93354b
commit 9d7d54a
Showing
4 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
export const useStyles = makeStyles()(theme => ({ | ||
playerFrame: { | ||
position: 'absolute', | ||
top: 0, | ||
right: 0, | ||
bottom: 0, | ||
left: 0, | ||
borderWidth: 1, | ||
borderStyle: 'solid', | ||
borderColor: theme.palette.divider, | ||
// Ensures border width is included in the element's total width and height | ||
boxSizing: 'border-box', | ||
// Ensures any interactions like clicks go through this overlay to the underlying elements | ||
pointerEvents: 'none', | ||
// Overlay player | ||
zIndex: 2, | ||
}, | ||
})); | ||
|
||
export interface PlayerFrameProps { | ||
className?: string; | ||
} | ||
/** | ||
* The frame is overlaying the media. This allows for translucent frames. | ||
*/ | ||
export function PlayerFrame({ className }: PlayerFrameProps) { | ||
const { classes, cx } = useStyles(); | ||
return <div className={cx(className, classes.playerFrame)} />; | ||
} |
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 './PlayerFrame'; |
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