@centreon/react-components
Version:
react components used by centreon web frontend
26 lines (22 loc) • 725 B
JavaScript
/* eslint-disable react/jsx-filename-extension */
/* eslint-disable react/prop-types */
import React from 'react';
import classnames from 'classnames';
import styles from './icon-legend.scss';
import IconAction from '../IconAction';
const IconLegend = ({ iconColor, buttonIconType, title, legendType }) => {
const cn = classnames(styles['icon-legend'], styles[legendType || '']);
return (
<span className={cn}>
<IconAction
iconDirection="icon-position-center"
iconColor={iconColor || ''}
iconActionType={buttonIconType}
/>
{title && (
<span className={classnames(styles['icon-legend-title'])}>{title}</span>
)}
</span>
);
};
export default IconLegend;