maybe? a girl can dream

This commit is contained in:
Violet Caulfield
2025-02-10 22:06:02 -06:00
parent eb82bc6c21
commit 2cef65604f
2 changed files with 12 additions and 9 deletions

View File

@@ -2,12 +2,13 @@ import Icon from "../../../components/Global/helpers/icon";
import { Label } from "../../../components/Global/helpers/text";
import { Popover, Adapt, YStack, XStack, Input, getToken, Button } from "tamagui";
export default function AddPlaylistPopover() : React.JSX.Element {
export default function AddPlaylistPopover({
open
}: {
open: boolean
}) : React.JSX.Element {
return (
<Popover size="$5">
<Popover.Trigger asChild>
<Icon name="plus-circle-outline" color={getToken("$color.telemagenta")} />
</Popover.Trigger>
<Popover open={open} size="$5">
{/* {shouldAdapt && (
<Adapt when="sm" platform="touch">

View File

@@ -3,13 +3,15 @@ import { useUserPlaylists } from "../../../api/queries/playlist";
import { ItemCard } from "../../Global/components/item-card";
import { H2 } from "../../../components/Global/helpers/text";
import { StackParamList } from "../../../components/types";
import React from "react";
import React, { useState } from "react";
import { FlatList } from "react-native";
import { View, XStack, YStack } from "tamagui";
import { getToken, View, XStack, YStack } from "tamagui";
import AddPlaylistPopover from "./add-playlist-popover";
import Icon from "@/components/Global/helpers/icon";
export default function Playlists({ navigation }: { navigation: NativeStackNavigationProp<StackParamList>}) : React.JSX.Element {
const [createPlaylist, setCreatePlaylist] = useState<boolean>(false);
const { data: playlists } = useUserPlaylists();
return (
@@ -18,8 +20,8 @@ export default function Playlists({ navigation }: { navigation: NativeStackNavig
<H2>Your Playlists</H2>
<YStack justifyContent="center" alignContent="flex-end" marginTop={7}>
{/* <Icon name="plus-circle-outline" color={getToken("$color.telemagenta")} /> */}
<AddPlaylistPopover />
<Icon name="plus-circle-outline" color={getToken("$color.telemagenta")} onPress={() => setCreatePlaylist(true)}/>
<AddPlaylistPopover open={createPlaylist}/>
</YStack>
</XStack>
<FlatList horizontal