import React from 'react' import withDefaults from '../utils/with-defaults' interface Props { span?: number offset?: number component?: keyof JSX.IntrinsicElements className?: string } const defaultProps = { span: 24, offset: 0, component: 'div' as keyof JSX.IntrinsicElements, className: '' } type NativeAttrs = Omit, keyof Props> export type ColProps = Props & typeof defaultProps & NativeAttrs const Col: React.FC> = ({ component, children, span, offset, className, ...props }) => { const Component = component return ( {children} ) } const MemoCol = React.memo(Col) export default withDefaults(MemoCol, defaultProps)