Skip to content

Commit

Permalink
sdp-tech#77 feat: add lookbook addButton component
Browse files Browse the repository at this point in the history
  • Loading branch information
eujin-shin committed Jul 6, 2024
1 parent 189547c commit 6cb3963
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/assets/lookbook/plusSquare.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/components/Lookbook/LookbookAddButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import PlusSquare from '../../assets/lookbook/plusSquare.svg';
import { Container } from 'react-native-collapsible-tab-view';

const LookbookAddButton = ({ onPress }: { onPress: () => void }) => {
return (
<View>
<TouchableOpacity onPress={onPress}>
<View style={Styles.container}>
<PlusSquare />
</View>
</TouchableOpacity>
</View>
);
};

const Styles = StyleSheet.create({
container: {
width: 54,
height: 54,
backgroundColor: 'black',
borderRadius: 100,
alignItems: 'center',
justifyContent: 'center',
margin: 5,
},
});

export default LookbookAddButton;
2 changes: 2 additions & 0 deletions src/pages/ComponentsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Dropdown from '../common/Dropdown';
import { useState } from 'react';
import { Body16M } from '../styles/GlobalText';
import LookbookButton from '../components/Lookbook/LookbookButton';
import LookbookAddButton from '../components/Lookbook/LookbookAddButton';

const TestDropdown = ({ index }: { index: number }) => {
const [value, setValue] = useState<string | undefined>(undefined);
Expand All @@ -26,6 +27,7 @@ export default function ComponentsTest() {
<View style={{ flex: 1 }}>
<Body16M>테스트용 페이지</Body16M>
<LookbookButton />
<LookbookAddButton onPress={() => {}} />
</View>
</SafeAreaView>
);
Expand Down

0 comments on commit 6cb3963

Please sign in to comment.