DocSpace-buildtools/packages/components/main-button
2023-06-02 15:26:23 +03:00
..
index.js front add rtl catalog item 2023-06-02 15:26:23 +03:00
main-button.stories.js Web: Components: fixed console warnings 2023-05-31 20:01:38 +05:00
main-button.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
README.md Web: Components: rename main button callback function 2023-05-23 19:21:14 +05:00
styled-main-button.js Web: Components: fixed main button theme in story 2023-05-31 14:29:45 +05:00

MainButton

The main button is located at the top of the main menu. It may consist of 2 buttons, or on a click to show a pop-up window with other buttons

Usage

import MainButton from "@docspace/components/main-button";
<MainButton text="Button" isDisabled={false} isDropdown={true}>
  <div>Some button</div>
  <Button label="Some button" />
</MainButton>

or

<MainButton
  text="Button"
  isDropdown={false}
  onkAction={() => SomeFunction()}
  moduleName="people"
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
onAction func - - - What the main button will trigger when clicked
iconName string - - PeopleIcon Icon inside button
id string - - - Accepts id
isDisabled bool - - false Tells when the button should present a disabled state
isDropdown bool - - true Select a state between two separate buttons or one with a drop-down list
moduleName oneOf - people, mail, documents - The name of the module where the button is used
onClick func - - - DropDown component click action
opened bool - - - Open DropDown
style obj, array - - - Accepts css style
text string - - Button Button text