UI Kit for react-native and react-native-web
npm install react-native-web-uikit> UI Kit for react-native and react-native-web
- git clone git@github.com:trucknet-io/react-native-web-uikit.git
- npm install
- to add a Storybook story, create a ComponentName.story.tsx file in component's folder
- to add a readme name file README.md in a component folder
- stories and readme files will be found, loaded and added to storybook automatically
Try to add to stories only required props, rest props will be added withSmartKnobs addon.
SmartKnobs will not automatically create knobs for props whose name is in the ignoreProps arrayaddDecorator(withSmartKnobs({ ignoreProps: ["gradientStartColor", "gradientEndColor"] }))
``
import { ThemeProviderWrapper } from "react-native-web-uikit";
{this.props.children}
`
`
import {
withTheme,
ThemeProps,
ThemeParamsType,
ThemeType,
} from "react-native-web-uikit";
type Styles = ReturnType
interface Props extends ThemeProps
class Component extends React.PureComponent
render() {
const { styles, theme, fonts, colors, toggleTheme, variables } = this.props;
return
}
}
const getStyles = ({ colors, fonts, variables }: ThemeParamsType) => {
const { shadow, size, borderRadius, borderWidth } = variables;
return (
StyleSheet.create({
container: {
backgroundColor: colors.background,
padding: size.m,
alignItems: "center",
justifyContent: "center",
},
card, {
flex: 1,
borderRadius,
borderWidth,
...shadow,
}
text: fonts.BodyRegular,
});
)
}
export default withTheme
`
- npm run storybook
- npm run android
``
import { ComponentName } from "react-native-web-uikit"
For show Modal Wrap Root Container with RootWrapper` Component
- react
- react-dom
- react-native
- react-native-linear-gradient
- react-native-svg
- react-native-modal
- react-native-webview
- react-content-loader
- react-native-shimmer-placeholder
- react-art
- react-native-web
- react-native-web-linear-gradient
- react-native-svg-web
- react-content-loader,