ListDetailMeta
Loading example…
ListDetailMeta is part of the Containers set, imported from @jcsoftdev/ui/containers.
Import
Section titled “Import”import { ListDetailMeta } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/list-detail.
export const SideBySide: Story = { decorators: inWidth("48rem"), play: async ({ canvasElement }) => { const canvas = within(canvasElement); const list = canvas.getByRole("list", { name: "Students" }); await expect(list).toBeVisible(); await expect(canvas.getByText("Pick a student.")).toBeVisible(); await expect(canvas.queryByRole("button", { name: "Back to list" })).toBeNull(); await userEvent.click(canvas.getByRole("button", { name: /Luis/ })); await expect(canvas.getByRole("button", { name: /Luis/ })).toHaveAttribute( "aria-current", "true", ); await expect(canvas.getByRole("region", { name: "Luis Ramírez" })).toBeVisible(); // Beside the list, the list stays visible and keeps focus. await expect(list).toBeVisible(); await expect(canvas.getByRole("button", { name: /Luis/ })).toHaveFocus(); await expect( getComputedStyle(list.closest("[data-view]") as Element).gridTemplateColumns.split(" "), ).toHaveLength(2); },};Source of the Storybook story.
This component declares no props of its own.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”- Side By Side
- Collapses To Single Pane
- Controlled
- Reports Selection
- Spanish Back
- Back Calls On Back
- List Rail
- Narrow Ratio
- Card With Header
Source
Section titled “Source”packages/ui/src/containers/list-detail/list-detail.tsx