DocSpace-client/packages/shared/components/drop-down
2024-01-15 14:47:38 +03:00
..
sub-components Shared:Components:DropDown: fix dropdown width 2023-12-20 19:25:31 +03:00
DropDown.constants.ts Shared:Components:DropDown: rewrite to typescript 2023-12-12 16:29:58 +03:00
DropDown.stories.tsx Shared:Components:DropDown: rewrite to typescript 2023-12-12 16:29:58 +03:00
DropDown.styled.ts Shared:Components:DropDown: rewrite to typescript 2023-12-12 16:29:58 +03:00
DropDown.test.tsx Shared:Components:ComboBox: rewrite to typescript 2023-12-13 18:02:41 +03:00
DropDown.tsx Shared:API:Files: fix moveto 2024-01-15 14:47:38 +03:00
DropDown.types.ts Shared:Components:DropDown: fix render 2024-01-15 14:44:49 +03:00
index.tsx Shared:Components:DropDown: fix 2023-12-20 18:38:06 +03:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

DropDown

Is a dropdown with any number of action

Usage

import { DropDown } from "@docspace/shared/components/drop-down";
<DropDown opened={false}></DropDown>

By default, it is used with DropDownItem elements in role of children.

If you want to display something custom, you can put it in children, but take into account that all stylization is assigned to the implemented component.

When using component, it should be noted that parent must have CSS property position: relative. Otherwise, DropDown will appear outside parent's border.

Properties

Props Type Required Values Default Description
className string - - - Accepts class
clickOutsideAction func - - - Required for determining a click outside DropDown with the withBackdrop parameter
directionX oneOf - left, right left Sets the opening direction relative to the parent
directionY oneOf - top, bottom bottom Sets the opening direction relative to the parent
id string - - - Accepts id
manualWidth string - - - Required if you need to specify the exact width of the component, for example 100%
manualX string - - - Required if you need to specify the exact distance from the parent component
manualY string - - - Required if you need to specify the exact distance from the parent component
maxHeight number - - - Required if the scrollbar is displayed
open bool - - false Tells when the dropdown should be opened
style obj, array - - - Accepts css style
withBackdrop bool - - true Used to display backdrop
showDisabledItems bool - - false Display disabled items or not
withBlur bool - - false Enable blur for backdrop