mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-06 00:04:39 +00:00
refactor: made voiceover selector in columns
This commit is contained in:
parent
3c95fa3c3e
commit
b5c8bcfa6e
1 changed files with 10 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue