ServiceSelector: rename truncation story to WithLineLimit, clamp to 1 line

Makes the line-clamp + "View more" toggle clearly visible in the story.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 22:07:06 +11:00
parent 9ce8a7e120
commit e775658f65

View File

@@ -132,22 +132,23 @@ export const CoffinSelection: Story = {
}, },
}; };
// --- With Truncated Descriptions --------------------------------------------- // --- With Line Limit ---------------------------------------------------------
/** Long descriptions with "View more" toggle */ /** Descriptions clamped to 1 line with "View more" toggle */
export const WithTruncatedDescriptions: Story = { export const WithLineLimit: Story = {
render: () => { render: () => {
const [selected, setSelected] = useState<string | undefined>(); const [selected, setSelected] = useState<string | undefined>();
return ( return (
<ServiceSelector <ServiceSelector
heading="Choose a service type" heading="Choose a service type"
subheading="Click 'View more' on any option to read the full description."
items={serviceTypes} items={serviceTypes}
selectedId={selected} selectedId={selected}
onSelect={setSelected} onSelect={setSelected}
continueLabel="Continue" continueLabel="Continue"
onContinue={() => alert(`Selected: ${selected}`)} onContinue={() => alert(`Selected: ${selected}`)}
maxDescriptionLines={2} maxDescriptionLines={1}
/> />
); );
}, },