Skip to content

Commit

Permalink
flex-col container.jsx has been added to components
Browse files Browse the repository at this point in the history
  • Loading branch information
XINEXPORT committed Apr 10, 2024
1 parent 3292447 commit 7e8f102
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from './components/Typography';
import ThirdPartySignIn from './components/ThirdPartySignIn';
import FlexContainer from './components/FlexContainer';
import FlexColContainer from './components/FlexColContainer';
import AddProductCard from './components/AddProductCard';
import Checkbox from './components/Checkbox';
import Accordion from './components/Accordion';
Expand Down Expand Up @@ -100,6 +101,13 @@ export default function App() {
<Text>Component 4</Text>
<Text>Component 5</Text>
</FlexContainer>
<FlexColContainer>
<Text>Component 1</Text>
<Text>Component 2</Text>
<Text>Component 3</Text>
<Text>Component 4</Text>
<Text>Component 5</Text>
</FlexColContainer>
<Nav />
<Checkbox label='Vegetarian' isChecked={false} />
</View>
Expand Down
20 changes: 20 additions & 0 deletions components/FlexColContainer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import { View, StyleSheet } from 'react-native';

const FlexColContainer = ({ children }) => {
return <View style={styles.container}>{children}</View>;
};

const styles = StyleSheet.create({
container: {
flexDirection: 'col',
alignItems: 'center',
justifyContent: 'space-between',
paddingHorizontal: 16,
paddingVertical: 8,
flexWrap: 'wrap',
gap: 10,
},
});

export default FlexColContainer;

0 comments on commit 7e8f102

Please sign in to comment.