import React, { FC, PropsWithChildren } from 'react'
import { BreakpointProps, useBreakpoint } from './useBreakpoint'

export const Breakpoint: FC<PropsWithChildren<BreakpointProps>> = ({ children, ...props }) => {
	const enabled = useBreakpoint(props)

	return enabled ? <>{children}</> : null
}
