import { ColorBoxProps } from './types'; import ColorPalette from './colorPaletteList'; import './ColorPalette.scss'; // Component to render each color card const ColorBox = ({ name, colorCode, opacity, dropShadow, border, }: ColorBoxProps) => { const opacityPercentage = opacity ? `${Math.round(opacity * 100)}%` : ''; const boxStyle = { background: colorCode, opacity: opacity, filter: dropShadow ? dropShadow : '', border: `1px solid ${border}`, }; return (
{name}
{colorCode} {opacityPercentage && `opacity ${opacityPercentage}`}
{border && `Border -${border}`}
); }; // Main Colors component const Colors = () => { return (
Colors
Application of the color palette brings a unified and recognisable consistency to MX's array of digital products and interface.
{ColorPalette.map((color) => ( ))}
); }; export default Colors;