update
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import { View, Text, FlatList, StyleSheet } from "react-native";
|
||||
import React, { useState } from "react";
|
||||
import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader";
|
||||
import ItemContainer from "../../components/ItemContainer/ItemContainer";
|
||||
import { Palette } from "../../styles";
|
||||
import { FONT_FAMILY } from "../../styles/Fonts";
|
||||
import { BlurView } from "expo-blur";
|
||||
|
||||
const ChooseInstruments = () => {
|
||||
const [containerLayout, setContainerLayout] = useState(null);
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1, gap: 10 }}>
|
||||
<CreateLyricsHeader
|
||||
title="Choisis des instruments"
|
||||
subTitle="Tu peux choisir jusqu’à 5 instruments différents"
|
||||
/>
|
||||
<View
|
||||
style={{ flex: 1 }}
|
||||
onLayout={(event) => setContainerLayout(event.nativeEvent.layout)}
|
||||
>
|
||||
<ItemContainer height={containerLayout?.height}>
|
||||
<FlatList
|
||||
data={Array.from({ length: 10 })}
|
||||
showsVerticalScrollIndicator={false}
|
||||
contentContainerStyle={styles.contentContainer}
|
||||
renderItem={() => (
|
||||
<View style={styles.itemContainer}>
|
||||
<BlurView
|
||||
intensity={30}
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: Palette.glass,
|
||||
paddingHorizontal: 12,
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<Text style={styles.itemText}>Piano classique</Text>
|
||||
</BlurView>
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
</ItemContainer>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default ChooseInstruments;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
contentContainer: {
|
||||
flexGrow: 1,
|
||||
padding: 8,
|
||||
gap: 10,
|
||||
backgroundColor: "#FFFFFF00",
|
||||
paddingBottom: 50,
|
||||
},
|
||||
itemContainer: {
|
||||
height: 54,
|
||||
backgroundColor: Palette.glass,
|
||||
borderRadius: 14,
|
||||
overflow: "hidden",
|
||||
shadowColor: "#00000040",
|
||||
shadowOffset: {
|
||||
width: 0,
|
||||
height: 2,
|
||||
},
|
||||
shadowOpacity: 0.25,
|
||||
shadowRadius: 3.84,
|
||||
|
||||
elevation: 5,
|
||||
},
|
||||
itemText: {
|
||||
fontSize: 16,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterRegular,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user