import React, { Component } from 'react'; import Prism from 'prismjs'; import { PageTitle, ComponentSubtitle, Section, ComponentDescription, CodeInline, Link, SideScrollMenu, Helmet, } from '@components'; import { DataTable, DataTableCell, DataTableRow } from '../../../../src'; const sections = [ { name: 'Started' }, { name: 'Setup' }, { name: 'Developing' }, { name: 'Storybook' }, ]; class Index extends Component { componentDidMount() { Prism.highlightAll(); } render() { return (
Contributing to Library
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:
  1. Fork material-bread repo on github
  2. Clone the fork to your machine{' '}
  3. Cd into project{' '}
  4. Install dependencies by running{' '} or{' '}
  5. Start up react native app by running{' '} {' '} or{' '}
  6. 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:
  1. Create a basic component folder and file in{' '} {' '} named .
  2. Import and Wrap component in the HOC theme component as such
  3. Add component to{' '} as such{' '} .
  4. Create component file in{' '} {' '} as shown in the other files
  5. 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;