@tryrolljs/design-system v1.5.2
@tryrolljs/design-system
Install
yarn add @tryrolljs/design-system
npx install-peerdeps @tryrolljs/design-system
Setup
Web
The web version of the package works out of the box.
Native
The package is ready for react-native
with a minimum amount of changes. You have to add an alias to your react-native application & it'll work smoothly.
// babel.config.js
module.exports = {
plugins: [
[
"module-resolver",
{
alias: {
"@tryrolljs/design-system": "@tryrolljs/design-system/dist/native/esm"
}
}
]
]
}
Usage
Wrap the root of your application with the theme provider.
import { TryrollProvider } from '@tryrolljs/design-system'
const App = ({ children }) => {
return (
<TryrollProvider>
{children}
</TryrollProvider>
)
}
Enjoy using the well-typed package available for ESM & CJS. 🥳
import { Text, useTheme } from '@tryrolljs/design-system'
const MyComponent = () => {
const theme = useTheme();
return (
<Text style={{ color: theme.text.primary }}>
@tryrolljs/design-system is awesome!
</Text>
)
}
Development
Web
Use Storybook to test your changes locally.
yarn start
Native
You can use React Native Storybook to test changes locally. You'll need to add your story to
- Add your story to storybook.requires.js.
- Run
yarn start:native
- Run
yarn ios
for iOS development. - Run
yarn android
for Android development.
11 months ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 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
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
2 years ago
1 year ago
1 year ago
2 years 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
2 years 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