This project uses{' '}
Storybook as
it's development environment for both React Native and the
web. Storybook has it's own simple webserver to run the web
components, but the project uses a bare React Native app to
run it's components and the Storybook environment.
The main project folders are as follows:
Essentially the project files are in the{' '}
of the folder, and all
documtation files live in the{' '}
folder.
}
/>
You can follow the{' '}
React Native Docs
{' '}
to get React Native installed if you need to. Once you have
React Native set up, follow these steps to get the project set
up:
Fork material-bread repo on github
Clone the fork to your machine{' '}
Cd into project{' '}
Install dependencies by running{' '}
or{' '}
Start up react native app by running{' '}
{' '}
or{' '}
Start up web project by openning a new terminal tab and
running
The app should be running on whichever simulator you set up, and
the web app should be available at{' '}
.
}
/>
Components all live in{' '}
, and
they're displayed in the dev environment in a corresponding
file{' '}
.
Use the following steps to create a new component:
Create a basic component folder and file in{' '}
{' '}
named
.
Import
and Wrap component in the HOC theme component as such
Add component to{' '}
as such{' '}
.
Create component file in{' '}
{' '}
as shown in the other files
Add component story to{' '}
{' '}
as such{' '}
{' '}
.
You should now see your component listed in your Storybook
environment on the app or the web.
}
/>
The storybook environment houses all of the components for
development, but its also used in the docs to display more
variations. This means the storybook stories you write will
appear in the docs for users to play with. For more information
about writing storybook stories, refer to{' '}
storybook documentation
}
/>
);
}
}
const styles = {
container: {
display: 'flex',
flexDirection: 'column',
width: '100%',
paddingBottom: 60,
},
code: {},
};
export default Index;