fabric-ui-react-color-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Color input component

Allows you to use the color input component from this example

Installing

npm install fabric-ui-react-color-input --save

Example

import * as React from 'react';
import { ColorInput } from 'fabric-ui-react-color-input';
import { Fabric } from 'office-ui-fabric-react/lib/Fabric';

export interface IAppState {
    color: string;
}

export class App extends React.PureComponent<{}, IAppState> {

    constructor(props) {
        super(props);
        this.state = {
            color: 'red'
        };
    }

    public render(): React.ReactElement<{}> {
        return (
            <Fabric>
                <ColorInput value={this.state.color} onChange={this._handleColorChange} />
            </Fabric>
        );
    }

    private _handleColorChange = color => this.setState({ color });

}

Package Sidebar

Install

npm i fabric-ui-react-color-input

Weekly Downloads

11

Version

1.0.4

License

ISC

Unpacked Size

7.84 kB

Total Files

12

Last publish

Collaborators

  • dmytro.shyshko