// Copyright (c) Meta Platforms, Inc. and affiliates. 'use client'; import {useRef} from 'react'; import {useResizable, ResizeHandle} from '@astryxdesign/core/Resizable'; import { Card, Layout, LayoutContent, LayoutPanel, VStack, } from '@astryxdesign/core/Layout'; import {Text, Heading} from '@astryxdesign/core/Text'; export default function ResizableShowcase() { // The sidebar's limit is a share of the card, so in a narrow column the // resize handle never leaves the card. const cardRef = useRef(null); const sidebar = useResizable({ defaultSize: 200, minSize: 120, maxSize: '66%', containerRef: cardRef, }); return ( Sidebar {Math.round(sidebar.size)}px wide } content={ Content Drag the handle to resize the sidebar. } /> ); }