diff --git a/app/client/packages/design-system/ads/src/List/List.stories.tsx b/app/client/packages/design-system/ads/src/List/List.stories.tsx index 160b027f7d8..cd1acd256d6 100644 --- a/app/client/packages/design-system/ads/src/List/List.stories.tsx +++ b/app/client/packages/design-system/ads/src/List/List.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { List, ListItem, Icon } from "@appsmith/ads"; +import { List, ListItem, Icon, Button } from "@appsmith/ads"; import type { StoryObj } from "@storybook/react"; import type { ListItemProps, ListProps } from "@appsmith/ads"; @@ -79,15 +79,21 @@ const ListItemArgTypes = { }, }, }, - endIcon: { - control: "text", - description: "The icon to display at the end of the list item", + rightControl: { + description: "The control to display at the end of the list item", table: { type: { - summary: "string", + summary: "ReactNode", }, }, }, + rightControlVisibility: { + description: + "`always` type will show the right control always. `hover` type will show the right control only when the list item is hovered.", + control: "radio", + options: ["always", "hover"], + defaultValue: "always", + }, description: { control: "text", description: "Description text to be shown alongside the title", @@ -140,11 +146,12 @@ const ListItemArgTypes = { }, }, }, - onEndIconClick: { - description: "callback for when the end icon is clicked", + customTitleComponent: { + description: + "A custom title component for the list item to use input component for name editing", table: { type: { - summary: "() => void", + summary: "ReactNode", }, }, }, @@ -163,7 +170,7 @@ ListItemLargeStory.args = { description: "inline", descriptionType: "inline", size: "lg", - endIcon: "add-more", + rightControl: , }; export const ListItemErrorStory = ListItemTemplate.bind({}) as StoryObj; @@ -215,10 +222,12 @@ ListItemOverflowStory.args = { title: "Action item 1 Action item 1 Action item 1 Action item 1", }; -export const ListItemEndIconStory = ListItemTemplate.bind({}) as StoryObj; -ListItemEndIconStory.storyName = "List item end icon"; -ListItemEndIconStory.argTypes = ListItemArgTypes; -ListItemEndIconStory.args = { +export const ListItemRightControlStory = ListItemTemplate.bind({}) as StoryObj; +ListItemRightControlStory.storyName = "List item right control"; +ListItemRightControlStory.argTypes = ListItemArgTypes; +ListItemRightControlStory.args = { title: "Action item 1", - endIcon: "add-more", + rightControl: ( +