import * as React from 'react' export type HiddenProps> = { hidden: boolean type: 'layout' | 'visual' component?: TComponent } & TProps export const Hidden = React.forwardRef( function VisuallyHidden> ({ hidden, type, component: Component = 'div', style, ...props }: HiddenProps, ref: React.Ref) { const styleProp = type === 'layout' ? { display: hidden ? 'none' : 'block' } : { visibility: hidden ? 'hidden' : 'visible' } return ( ) }, ) as >(props: HiddenProps) => JSX.Element