diff --git a/examples/react-demo/package.json b/examples/react-demo/package.json index 643122a9..fad175f5 100644 --- a/examples/react-demo/package.json +++ b/examples/react-demo/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@vjs-10/react": "workspace:*", + "@vjs-10/react-icons": "workspace:*", "react": "^18.0.0", "react-dom": "^18.0.0", "tailwindcss": "^4.1.13" diff --git a/examples/react-demo/src/App.tsx b/examples/react-demo/src/App.tsx index 5f5c7064..6e11a9b2 100644 --- a/examples/react-demo/src/App.tsx +++ b/examples/react-demo/src/App.tsx @@ -1,9 +1,13 @@ import type { ChangeEventHandler } from 'react'; import { MediaProvider, MediaSkinDefault, MediaSkinToasted, Video } from '@vjs-10/react'; - +// NOTE: Commented out imports are for testing locally/externally defined skins. +// import { MediaProvider, Video } from '@vjs-10/react'; import { useCallback, useMemo, useState } from 'react'; +// import MediaSkinDefault from './skins/frosted/MediaSkinDefault'; +// import MediaSkinToasted from './skins/toasted/MediaSkinToasted'; + import './globals.css'; const skins = [ diff --git a/examples/react-demo/src/skins/frosted/MediaSkinDefault.tsx b/examples/react-demo/src/skins/frosted/MediaSkinDefault.tsx new file mode 100644 index 00000000..d1c70265 --- /dev/null +++ b/examples/react-demo/src/skins/frosted/MediaSkinDefault.tsx @@ -0,0 +1,136 @@ +import type { PropsWithChildren } from 'react'; + +import { + CurrentTimeDisplay, + DurationDisplay, + FullscreenButton, + MediaContainer, + MuteButton, + PlayButton, + Popover, + TimeSlider, + Tooltip, + VolumeSlider, +} from '@vjs-10/react'; + +import { + FullscreenEnterIcon, + FullscreenExitIcon, + PauseIcon, + PlayIcon, + VolumeHighIcon, + VolumeLowIcon, + VolumeOffIcon, +} from '@vjs-10/react-icons'; + +import styles from './styles'; + +type SkinProps = PropsWithChildren<{ + className?: string; +}>; + +export default function MediaSkinDefault({ children, className = '' }: SkinProps): JSX.Element { + return ( + + {children} + + {/* Background gradient to help with controls contrast. */} +