Skip to content

Commit

Permalink
sdp-tech#77 feat: add lookbook button component
Browse files Browse the repository at this point in the history
  • Loading branch information
eujin-shin committed Jul 6, 2024
1 parent 48a8547 commit 189547c
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 134 deletions.
27 changes: 27 additions & 0 deletions src/components/Lookbook/LookbookButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { StyleSheet, View, ViewStyle } from 'react-native';
import { GREEN, PURPLE } from '../../styles/GlobalColor';
import { Upcymall12M } from '../../styles/GlobalText';

const LookbookButton = ({ positioning }: { positioning?: ViewStyle }) => {
return (
<View style={{ ...positioning }}>
<View style={Styles.container}>
<Upcymall12M style={{ color: GREEN }}>UPCYMALL</Upcymall12M>
</View>
</View>
);
};

const Styles = StyleSheet.create({
container: {
backgroundColor: PURPLE,
paddingHorizontal: 8,
paddingVertical: 6,
borderRadius: 5,
width: 'auto',
alignSelf: 'flex-start',
margin: 5,
},
});

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

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

0 comments on commit 189547c

Please sign in to comment.