import { SortableContainer } from '@o/react-sortable-hoc'
import AutoResponsive from 'autoresponsive-react'
import React from 'react'
import { useNodeSize } from '../hooks/useNodeSize'
import { ViewProps } from '../View/types'
import { View } from '../View/View'
import { useVisibility } from '../Visibility'
export type MasonryLayoutProps = ViewProps & {
children?: React.ReactNode
}
export function MasonryLayout({ children, padding, ...props }: MasonryLayoutProps) {
const visible = useVisibility()
const size = useNodeSize({
throttle: 500,
ignoreFirst: true,
disable: !visible,
})
return (