DocSpace-client/packages/components/main-button-mobile
Ilya Oleshko 19e8b2210a Merge branch 'master' into develop
# Conflicts:
#	packages/client/src/helpers/constants.js
#	packages/client/src/pages/AccountsHome/Section/Filter/index.js
#	packages/client/src/pages/Home/InfoPanel/Body/sub-components/ItemTitle/AccountsItemTitle.js
#	packages/client/src/pages/Home/Section/AccountsBody/RowView/userContent.js
#	packages/client/src/pages/Home/Section/Header/index.js
#	packages/client/src/pages/Home/index.js
#	packages/client/src/pages/PortalSettings/categories/common/Customization/dns-settings.js
#	packages/client/src/pages/PortalSettings/categories/common/branding.js
#	packages/client/src/pages/PortalSettings/categories/security/access-portal/index.js
#	packages/client/src/store/FilesActionsStore.js
#	packages/common/components/Article/sub-components/article-payment-alert.js
#	packages/common/components/Section/index.js
#	packages/components/floating-button/styled-floating-button.js
#	packages/login/src/client/App.tsx
#	packages/login/src/client/components/Invalid/index.tsx
#	products/ASC.Files/Core/Core/FileStorageService.cs
#	products/ASC.Files/Core/Utils/FileConverter.cs
#	yarn.lock
2023-05-29 14:36:12 +03:00
..
index.js Merge branch 'master' into develop 2023-05-29 14:36:12 +03:00
main-button-mobile.stories.js Web: Components: fixed display mobile main button in story 2023-03-31 20:40:58 +05:00
README.md Web:Common/Client/Components: add PUBLIC_DIR alias 2023-01-27 17:08:30 +03:00
styled-main-button.js Web:Adding history for FloatingButton in the Components module. 2023-05-26 14:39:19 +03:00

MainButtonMobile

Usage

import MainButtonMobile from "@docspace/components/main-button-mobile";
import MobileActionsFolderReactSvgUrl from "PUBLIC_DIR/images/mobile.actions.folder.react.svg?url";
const actionOptions = [
  {
    key: "1",
    label: "New document",
    icon: MobileActionsFolderReactSvgUrl,
  },
  {
    key: "2",
    label: "New presentation",
    icon: MobileActionsFolderReactSvgUrl,
  },
];

const buttonOptions = [
  {
    key: "1",
    label: "Import point",
  },
  {
    key: "2",
    label: "Import point",
  },
];

const progressOptions = [
  {
    key: "1",
    label: "Uploads",
    percent: 30,
    status: `8/10`,
    open: true,
  },
];

<MainButtonMobile
  style={{
    top: "90%",
    left: "82%",
    position: "fixed",
  }}
  manualWidth="320px"
  title="Upload"
  withButton={true}
  actionOptions={actionOptions}
  progressOptions={progressOptions}
  isOpenButton={true}
  buttonOptions={buttonOptions}
/>;
Props Type Required Values Default Description
style obj, array - - - Accepts css style
actionOptions obj - - - Options for drop down items
progressOptions obj - - - If you need display progress bar components
buttonOptions obj - - - Menu that opens by clicking on the button
onUploadClick func - - - The function that will be called after the button click
withButton bool - - - Show button inside drop down
isOpenButton bool - - - The parameter that is used with buttonOptions is needed to open the menu by clicking on the button
title string - - The name of the button in the drop down
percent number - - - Loading indicator
manualWidth string - - - Required if you need to specify the exact width of the drop down component
opened bool - - - Tells when the dropdown should be opened
className string - - - Accepts class
onClose func - - - if you need close drop down