mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
e47fcfc62e
* Add store controls for fullscreen player * Normalize styles for playback config * Add fullscreen player component * Add option component * Update player controls to use option/popover components * Add esc hotkey to close player * Add usePlayerData hook
33 lines
581 B
TypeScript
33 lines
581 B
TypeScript
import { ReactNode } from 'react';
|
|
import { Flex, Group } from '@mantine/core';
|
|
|
|
export const Option = ({ children }: any) => {
|
|
return (
|
|
<Group
|
|
grow
|
|
p="0.5rem"
|
|
>
|
|
{children}
|
|
</Group>
|
|
);
|
|
};
|
|
|
|
interface LabelProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
const Label = ({ children }: LabelProps) => {
|
|
return <Flex align="flex-start">{children}</Flex>;
|
|
};
|
|
|
|
interface ControlProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
const Control = ({ children }: ControlProps) => {
|
|
return <Flex justify="flex-end">{children}</Flex>;
|
|
};
|
|
|
|
Option.Label = Label;
|
|
Option.Control = Control;
|