// /** @jsxRuntime classic */ // /** @jsx jsx */ // import { jsx } from '@theme-ui/core' // import React, { ComponentProps, ComponentType } from 'react' // import type { ResponsiveSSRStyles } from './index' // import { SSRMediaQuery } from '../provider/fresnel' // import { StyleSheetCache } from './cache' // type Props = { // Component: ComponentType // responsiveStyles: ResponsiveSSRStyles // style: unknown // containerStyles?: any // // nativeStyle?: StyledProps['style'] // } // const SSR = React.forwardRef(function SSRComponent( // { // responsiveStyles, // Component, // style, // containerStyles = {}, // // nativeStyle, // ...props // }: Props, // ref: T // ) { // return ( // <> // {responsiveStyles.map((breakpointStyle = {}, breakpointIndex) => { // const responsiveProps: Omit< // ComponentProps, // 'children' // > = {} // if (breakpointIndex === responsiveStyles.length - 1) { // // for the last item in the array, it should go from here until larger sizes // responsiveProps.greaterThanOrEqual = `${breakpointIndex}` as typeof responsiveProps.greaterThanOrEqual // } else { // responsiveProps.at = `${breakpointIndex}` as typeof responsiveProps.at // } // const cachedBreakpointStyle = StyleSheetCache.get( // breakpointStyle as any // ) // return ( // // {(classNames, renderChildren) => { // return ( //
*': { // // reset chilren to accept pointer events again 😇 // pointerEvents: 'auto', // }, // ...containerStyles, // } // : undefined // } // className={classNames} // > // {!!renderChildren ? ( // // ) : null} //
// ) // }} //
// ) // })} // // ) // }) // export const SSRComponent = React.memo(SSR)