react-color
Version:
A Collection of Color Pickers from Sketch, Photoshop, Chrome & more
40 lines (36 loc) • 948 B
JavaScript
import React from 'react';
import reactCSS from 'reactcss';
export var PhotoshopButton = function PhotoshopButton(_ref) {
var onClick = _ref.onClick,
label = _ref.label,
children = _ref.children,
active = _ref.active;
var styles = reactCSS({
'default': {
button: {
backgroundImage: 'linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)',
border: '1px solid #878787',
borderRadius: '2px',
height: '20px',
boxShadow: '0 1px 0 0 #EAEAEA',
fontSize: '14px',
color: '#000',
lineHeight: '20px',
textAlign: 'center',
marginBottom: '10px',
cursor: 'pointer'
}
},
'active': {
button: {
boxShadow: '0 0 0 1px #878787'
}
}
}, { active: active });
return React.createElement(
'div',
{ style: styles.button, onClick: onClick },
label || children
);
};
export default PhotoshopButton;