import clsx from 'clsx';
import type { CSSProperties, ReactNode } from 'react';

export interface LKSIconProps {
  size?: string | number;
  color?: string;
  className?: string;
  style?: CSSProperties;
}

const PREFIX = 'lks-icon';

export const LKSIcon = ({
  size = 18,
  color = 'currentColor',
  className,
  style = {},
  children,
}: LKSIconProps & { children: ReactNode }) => (
  <span
    className={clsx(PREFIX, className)}
    style={{
      fontSize: `${size}px`,
      color,
      ...style,
    }}
  >
    {children}
  </span>
);
