DocSpace-client/packages/shared/components/drop-down
2024-06-05 18:08:59 +03:00
..
sub-components Web: Client/Shared: LanguageCombobox component logic has been simplified. 2024-04-24 15:14:51 +03:00
DropDown.constants.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
DropDown.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
DropDown.styled.ts Client: Login: DocEditor Remove increasing value for RTL 2024-04-17 10:55:33 +02:00
DropDown.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
DropDown.tsx Returning a backdrop solution without using portals. 2024-06-05 18:08:59 +03:00
DropDown.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
index.tsx Returning a backdrop solution without using portals. 2024-06-05 18:08:59 +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