2.9.2 • Published 3 years ago

react-native-web-uikit v2.9.2

Weekly downloads
227
License
-
Repository
github
Last release
3 years ago

UI Kit

UI Kit for react-native and react-native-web

StoryBook

  • 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 array addDecorator(withSmartKnobs({ ignoreProps: ["gradientStartColor", "gradientEndColor"] }))

ThemeProvider

import { ThemeProviderWrapper } from "react-native-web-uikit";

<ThemeProviderWrapper>
    {this.props.children}
</ThemeProviderWrapper>
import {
  withTheme,
  ThemeProps,
  ThemeParamsType,
  ThemeType,
} from "react-native-web-uikit";

type Styles = ReturnType<typeof getStyles>;

interface Props extends ThemeProps<Styles> {}

class Component extends React.PureComponent<Props, State> {
    render() {
        const { styles, theme, fonts, colors, toggleTheme, variables } = this.props;
        return <View style={styles.container} />
    }
}

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<Props, DefaultProps>(getStyles)(Component);

Web

- `npm run storybook`

Mobile

- `npm run android`

Usage

import { ComponentName } from "react-native-web-uikit"
<ComponentName {...props} />

For show Modal Wrap Root Container with RootWrapper Component

Libraries

Peer Dependencies

- react
- react-dom

Peer Dependencies Mobile

- react-native
- react-native-linear-gradient
- react-native-svg
- react-native-modal
- react-native-webview
- react-content-loader
- react-native-shimmer-placeholder

Peer Dependencies Web

- react-art
- react-native-web
- react-native-web-linear-gradient
- react-native-svg-web
- react-content-loader,
2.9.2

3 years ago

2.9.1

3 years ago

2.9.0

3 years ago

2.8.16

4 years ago

2.8.15

4 years ago

2.8.14

4 years ago

2.8.13

4 years ago

2.8.12

4 years ago

2.8.11

4 years ago

2.8.10

4 years ago

2.8.9

4 years ago

2.8.8

4 years ago

2.8.7

4 years ago

2.8.6

4 years ago

2.8.5

4 years ago

2.8.4

4 years ago

2.8.3

4 years ago

2.8.2

4 years ago

2.8.0

4 years ago

2.7.5

4 years ago

2.7.4

4 years ago

2.7.3

4 years ago

2.7.2

4 years ago

2.7.1

4 years ago

2.7.0

4 years ago

2.6.0

4 years ago

2.5.9

4 years ago

2.5.8

4 years ago

2.5.7

4 years ago

2.5.6

4 years ago

2.5.5

4 years ago

2.5.4

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.8

5 years ago

2.4.7

5 years ago

2.4.6

5 years ago

2.4.5

5 years ago

2.4.4

5 years ago

2.4.3

5 years ago

2.4.2

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago