DocSpace-client/packages/shared/components/context-menu-button
2024-08-06 13:59:26 +03:00
..
ContextMenuButton.enums.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ContextMenuButton.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
ContextMenuButton.styled.ts Shared: use colors from theme 2024-06-28 14:23:01 +03:00
ContextMenuButton.test.tsx Shared: use colors from theme 2024-06-20 16:05:55 +03:00
ContextMenuButton.tsx fixed <ContextButton/> component wrong icon color 2024-05-16 14:59:02 +03:00
ContextMenuButton.types.tsx Web: Files: added public-room editing 2024-07-10 19:07:53 +03:00
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

ContextMenuButton

ContextMenuButton is used for displaying context menu actions on a list's item

Usage

import { ContextMenuButton } from "@docspace/shared/components/context-menu-button";
import VerticalDotsReactSvgUrl from "PUBLIC_DIR/images/vertical-dots.react.svg?url";
<ContextMenuButton
  iconName={VerticalDotsReactSvgUrl}
  size={16}
  color="#A3A9AE"
  isDisabled={false}
  title="Actions"
  getData={() => [
    {
      key: "key",
      label: "label",
      onClick: () => alert("label"),
    },
  ]}
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
clickColor string - - - Specifies the icon click color
color string - - - Specifies the icon color
data array - - [ ] Array of options for display
directionX oneOf - left,right left What the button will trigger when mouse out of button
getData func - - Function for converting to inner data
hoverColor string - - - Specifies the icon hover color
iconClickName string - - - Specifies the icon click name
iconHoverName string - - - Specifies the icon hover name
iconName string - - VerticalDotsIcon Specifies the icon name
id string - - - Accepts id
isDisabled bool - - false Tells when the button should present a disabled state
onMouseEnter func - - - What the button will trigger when mouse hovered
onMouseLeave func - - - What the button will trigger when mouse leave
onMouseOut func - - - What the button will trigger when mouse out of button
onMouseOver func - - - What the button will trigger when mouse over button
opened bool - - false Tells when the button should present a opened state
size number - - 16 Specifies the icon size
style obj, array - - - Accepts css style
title string - - - Specifies the icon title