import clsx from "clsx"; import type { ComponentProps, ElementType } from "react"; type StyledProps = Omit, "as"> & { as?: T; }; export const Styled = (defaultElement: ElementType, classes: string) => { const StyledComponent = ({ as, className, ...props }: StyledProps) => { const Component = as ?? defaultElement; return ; }; return StyledComponent; };