react-color
Version:
A Collection of Color Pickers from Sketch, Photoshop, Chrome & more
22 lines (17 loc) • 498 B
Markdown
id: api-onClose
title: onClose
If you are using the ColorPicker as a popup, you can pass a function to `onClose` that will fire when the popup is closed. The callback gets called with the latest color information as the first argument.
```
var React = require('react');
var ColorPicker = require('react-color');
class Component extends React.Component {
handleClose(color) {
...
}
render() {
return <ColorPicker display={ true } onClose={ this.handleClose } />;
}
}
```