import * as React from 'react'; import classnames from 'classnames'; export type OverlayPropsType = { children?: React.ReactNode; partial?: boolean; className?: string; color?: ColorType; } & Omit< React.AllHTMLAttributes, 'children' | 'partial' | 'className' | 'color' >; export const COLOR = { BLUE: 'blue', BLACK: 'black', } as const; type ColorType = typeof COLOR[keyof typeof COLOR]; const Overlay = ({ partial, children, className, color = COLOR.BLUE, ...props }: OverlayPropsType) => { const overlayClass = classnames( 'sg-overlay', { 'sg-overlay--partial': partial, [`sg-overlay--${String(color)}`]: color, }, className ); return (
{children}
); }; export default Overlay;