DocSpace-client/packages/shared/components/selected-item
2024-03-21 18:09:55 +04:00
..
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Shared:Components:SelectedItem: rewrite to typescript 2023-12-21 10:51:00 +03:00
SelectedItem.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SelectedItem.styled.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SelectedItem.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SelectedItem.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SelectedItem.types.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00

SelectedItem

Usage

import { SelectedItem } from "@docspace/shared/components";
<SelectedItem
  text="sample text"
  onClick={() => console.log("onClose")}
></SelectedItem>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
id string - - - Accepts id
isDisabled bool - - false Tells when the button should present a disabled state
isInline bool - - true Sets the 'display: inline-block' property
onClose func - - - What the selected item will trigger when clicked
style obj, array - - - Accepts css style
text string - - - Selected item text
forwardedRef obj - - - Passes ref to component