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