@loadsmart/blocks
v1.4.2
Published
Loadsmart's React Native Components
Downloads
11
Maintainers
Keywords
Readme
:european_castle: Blocks
Loadsmart's React Native Components
Installation
$ yarn add @loadsmart/blocks
$ react-native link @loadsmart/blocks
Usage
Basic
import { Text, View } from 'react-native'
import { PrimaryButton } from '@loadsmart/blocks'
const MyComponent = () => (
<View>
<Text>Are you sure?</Text>
<PrimaryButton title='Confirm' />
</View>
)
Theming
import { Text, View } from 'react-native'
import { PrimaryButton, Theme, ThemeContext } from '@loadsmart/blocks'
const customTheme: Theme = {
primaryColor: '#18515E'
}
const MyComponent = () => (
<ThemeContext.Provider value={customTheme}>
<View>
<Text>Are you sure?</Text>
<PrimaryButton title='Confirm' />
</View>
</ThemeContext.Provider>
)
Testing
yarn test
Storybook
If you want to take a look and play with the components in this repo, we have a showcase app made with React Native.
License
Contributing
RFCs
If you want to submit a "Request for comments" proposal, branch out from master
(i.e.: rfc/my-feature
) copy 0000-template.md
to rfc/0000-my-feature.md
(where 'my-feature' is descriptive. don't assign an RFC number yet), fill in the RFC and submit a PR.
If your RFC gets approved, you can then merge the PR to master
.