mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 19:00:09 -04:00
24 lines
463 B
JavaScript
24 lines
463 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { react2angular } from 'react2angular';
|
|
|
|
import './color-box.less';
|
|
|
|
export function ColorBox({ color }) {
|
|
return <span style={{ backgroundColor: color }} />;
|
|
}
|
|
|
|
ColorBox.propTypes = {
|
|
color: PropTypes.string,
|
|
};
|
|
|
|
ColorBox.defaultProps = {
|
|
color: 'transparent',
|
|
};
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.component('colorBox', react2angular(ColorBox));
|
|
}
|
|
|
|
init.init = true;
|