0.1.0 • Published 4 years ago

react-native-picker-color v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

:art: react-native-picker-color

npm version

A react native reusable and color picker wheel

Usage

import React, { Component } from 'react';
import { Dimensions, StyleSheet, View } from 'react-native';
import { ColorWheel } from 'react-native-picker-color';

const Example = ({onChange}) => (
  <View style={{flex: 1}}>
    <ColorPickerHSV
      initialColor="#ee0000"
      onColorChange={color => console.log(color)}
      onColorChangeComplete={color => console.log(color)}
      radius={200}
      pickerSize={25}
    />
  </View>
);

Props

NameDescriptionTypeOptional
initialColorInitial value in hex/rgb formatStringYes
onColorChangeCallback when the value is changed or moved(rgb: string) => voidYes
onColorChangeCompleteCallback on mouseup or drag event has finished(rgb: string) => voidNo
radiusWidth of circle paletteNumberYes
pickerRadiusWidth of draggable pickerNumberYes

PRs and issues are more than welcome.