react-native-hexagon
TypeScript icon, indicating that this package has built-in type declarations

0.9.0 • Public • Published

react-native-hexagon

hexagon image for react native apps.

Installation

npm install react-native-hexagon

Usage

import { HexagonView } from 'react-native-hexagon';

// ...

export default function App() {
  const imgSource = {
    uri: 'https://picsum.photos/200/300.jpg',
    borderColor: '#d3d363',
    borderWidth: 5,
    cornerRadius: 16,
  };
  return (
    <View style={styles.container}>
      <HexagonView style={styles.avatar} source={imgSource} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  avatar: {
    height: 232,
    width: 232,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

image

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

Package Sidebar

Install

npm i react-native-hexagon

Weekly Downloads

29

Version

0.9.0

License

(MIT AND Apache-2.0)

Unpacked Size

89 kB

Total Files

31

Last publish

Collaborators

  • jafar.jabr