refactor: made voiceover selector in columns

This commit is contained in:
Kentai Radiquum 2025-03-16 01:31:30 +05:00
parent 3c95fa3c3e
commit b5c8bcfa6e
Signed by: Radiquum
GPG key ID: 858E8EE696525EED

View file

@ -56,6 +56,10 @@ const DropdownItem = ({
); );
}; };
const DropdownTheme = {
content: "md:grid md:grid-cols-2 xl:grid-cols-4 gap-2 w-full container",
};
export const VoiceoverSelector = (props: { export const VoiceoverSelector = (props: {
availableVoiceover: Voiceover[]; availableVoiceover: Voiceover[];
voiceover: Voiceover; voiceover: Voiceover;
@ -66,6 +70,7 @@ export const VoiceoverSelector = (props: {
return ( return (
<Dropdown <Dropdown
theme={DropdownTheme}
label="" label=""
dismissOnClick={true} dismissOnClick={true}
renderTrigger={() => ( renderTrigger={() => (
@ -76,9 +81,13 @@ export const VoiceoverSelector = (props: {
> >
{props.availableVoiceover.map((voiceover: Voiceover) => ( {props.availableVoiceover.map((voiceover: Voiceover) => (
<Dropdown.Item <Dropdown.Item
className="w-fit"
key={`voiceover_${voiceover.id}`} key={`voiceover_${voiceover.id}`}
onClick={() => { onClick={() => {
playerPreferenceStore.setPreferredVoiceover(props.release_id, voiceover.name); playerPreferenceStore.setPreferredVoiceover(
props.release_id,
voiceover.name
);
props.setVoiceover({ props.setVoiceover({
selected: voiceover, selected: voiceover,
available: props.availableVoiceover, available: props.availableVoiceover,