docs/developer_docs/components/ui/favestar.mdx
import { StoryWithControls } from '../../../src/components/StorybookWrapper';
FaveStar component for marking items as favorites
<StoryWithControls component="FaveStar" props={{ itemId: 1, isStarred: false, showTooltip: true }} controls={[ { name: "itemId", label: "Item ID", type: "number", description: "Unique identifier for the item" }, { name: "isStarred", label: "Is Starred", type: "boolean", description: "Whether the item is currently starred." }, { name: "showTooltip", label: "Show Tooltip", type: "boolean", description: "Show tooltip on hover." } ]} />
Edit the code below to experiment with the component:
function Demo() {
return (
<FaveStar
itemId={1}
showTooltip
/>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
itemId | number | 1 | Unique identifier for the item |
isStarred | boolean | false | Whether the item is currently starred. |
showTooltip | boolean | true | Show tooltip on hover. |
import { FaveStar } from '@superset/components';
:::tip[Improve this page] This documentation is auto-generated from the component's Storybook story. Help improve it by editing the story file. :::