@preply/ds-rn-lib v0.88.0
@preply/ds-rn-lib
DS component library for React Native
Using the Design System in a React Native app?
Follow the instructions in @preply/ds-workspace.
tl;dr:
import { RootProvider } from '@preply/ds-rn-root';
import { Text } from '@preply/ds-rn-lib';
export const App: FC = () => (
<RootProvider>
<Text>Hello!</Text>
</RootProvider>
);
Specific for React Native:
Install the packages
yarn add @preply/ds-rn-lib @preply/ds-rn-root
Add RootProvider
It should wrap the whole app as in the example above and will use the default theme. You can also override the theme by passing it as prop:
<AppProvider theme="bold-ui">
Contributing
Reach out to #design-system-public if you think you can help and keep an eye on DS Confluence for more docs, guides, work in progress, decisions, the works.
Development
You probably want to execute yarn dev
in the root, as per instructions in @preply/ds-workspace.
For quicker - and more focused - feedback, you can also directly use the scripts in this package directory, but make sure you have first executed yarn build
in root, or that you have the root yarn dev
script running in the background.
Tooling
Details about tools and configurations in @preply/ds-workspace.
Dependencies
Note: @preply/ds-***
are declared both as direct and peer dependencies:
- to ensure
rollup
excludes them from the bundle. - to ensure Lerna honours build sequence (does not do so for peer dependencies).
Dev dependencies
We only list the dependencies used directly in tests (@testing-library/react-native
, metro-react-native-babel-preset
) and some in which we need a specific version to avoid version mismatch and the tests crashing (react
, react-native
, react-test-renderer
)
Do NOT add dependencies on linting, testing, building tools unless:
- you need to require some resource in a doc file or a test.
- you need to add a very specific plugin to this package only and you want to signal the dependency loudly.
7 days ago
8 days ago
28 days ago
28 days ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
9 months ago
9 months ago
9 months ago
6 months ago
10 months ago
10 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
7 months ago
7 months ago
9 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago