generated from morewings/react-library-template
-
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.
feat(component): add Video player component
fix #480
- Loading branch information
Showing
18 changed files
with
1,091 additions
and
3 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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/box-arrow-down-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconDownloadVideo: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/frame-corners-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconFullscreen: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/pause-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconPause: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/picture-in-picture-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconPictureInPicture: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/play-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconPlay: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/box-arrow-down-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconSpeed: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/film-slate-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconVideo: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/speaker-high-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconVolume: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,13 @@ | ||
import type {FC, SVGProps} from 'react'; | ||
import Icon from '@phosphor-icons/core/assets/fill/speaker-slash-fill.svg?react'; | ||
import classNames from 'classnames'; | ||
|
||
import classes from './Icon.module.css'; | ||
|
||
type Props = SVGProps<SVGSVGElement> & { | ||
className?: string; | ||
}; | ||
|
||
export const IconVolumeOff: FC<Props> = ({className, ...restProps}) => { | ||
return <Icon className={classNames(classes.icon, className)} {...restProps} />; | ||
}; |
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,24 @@ | ||
import { Meta, ArgTypes, Story, Canvas, Source, Markdown, Primary } from "@storybook/blocks"; | ||
import {Video} from './Video.tsx'; | ||
import * as VideoStories from "./Video.stories.tsx"; | ||
|
||
<Meta title="Components/Video" of={VideoStories} /> | ||
|
||
# Video | ||
|
||
## Description | ||
|
||
`Video` component plays provided video file using Video Embed element. | ||
|
||
## Imports | ||
|
||
<Markdown>{` | ||
\`\`\`ts | ||
import {Video} from 'koval-ui'; | ||
\`\`\` | ||
`}</Markdown> | ||
|
||
<Primary /> | ||
|
||
<ArgTypes of={Video}/> | ||
|
Oops, something went wrong.