0.3.0 • Published 7 months ago

@hungshidro/react-native-ui-library v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

react-native-ui-library

a library made my hungshidro

Installation

npm install @hungshidro/react-native-ui-library

Usage

import { createColorWrapper } from '@hungshidro/react-native-ui-library';

// ...

const config = {
  dark: {
    background: 'black',
    color: 'white',
  },
  light: {
    background: 'blue',
    color: 'white',
  },
};

const { ColorProvider, setThemeColor, useColorTheme } =
  createColorWrapper(config);

const TestComponent = () => {
  const color = useColorTheme();

  return (
    <View
      style={{
        backgroundColor: color?.background,
      }}
    >
      <Text style={{ color: color?.color }}>
        background color: {color?.background}
      </Text>
    </View>
  );
};

return (
  <ColorProvider>
    <TestComponent />
  </ColorProvider>
);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.3.0

7 months ago

0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago