import { forwardRef, type ForwardedRef, type HTMLAttributes, type PropsWithChildren, } from 'react' import { getSkeletonProps, splitClassNameProp, } from '@pluralsight/headless-styles' import type { SkeletonOptions } from '@pluralsight/headless-styles/types' interface SkeletonProps extends SkeletonOptions, HTMLAttributes {} function SkeletonEl( props: PropsWithChildren, ref: ForwardedRef ) { const { children, kind, ...nativeProps } = props const skeletonProps = getSkeletonProps({ classNames: splitClassNameProp(nativeProps.className), kind, }) return (
{children}
) } export const Skeleton = forwardRef(SkeletonEl)