@engie-group/fluid-design-system-react
Version:
Fluid Design System React
76 lines (75 loc) • 2.2 kB
TypeScript
import { FabProperties } from '@engie-group/fluid-types';
import React from 'react';
import { WithHTMLAttributes } from '../../utils/typeHelpers';
import { NJFabProps } from './NJFab';
import './NJFab.module.scss';
export declare const NJFabMenu: React.ForwardRefExoticComponent<import("../../utils/typeHelpers").HTMLAttributesWithoutComponentProps<"div", NJFabMenuOwnProps> & FabProperties & FabMenuRefs & {
children: React.ReactElement<NJFabProps> | React.ReactElement<NJFabProps>[];
/**
* Where the menu should expand to
*/
dataPlacement?: "top" | "bottom" | "left" | "right";
/**
* Control opened state
*/
opened?: boolean;
/**
* Callback when open state changes
*/
onOpen?: (open: boolean) => void;
/**
* Initial opened state (uncontrolled)
*/
initialOpened?: boolean;
/**
* Whether to open the menu on hover
*/
openOnHover?: boolean;
/**
* Title attribute for the FAB button
*/
title?: string;
/**
* Whether the FAB menu is disabled
*/
disabled?: boolean;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
} & React.RefAttributes<HTMLDivElement>>;
type FabMenuRefs = {
buttonRef?: React.RefObject<HTMLButtonElement>;
listRef?: React.RefObject<HTMLUListElement>;
};
type NJFabMenuOwnProps = FabProperties & FabMenuRefs & {
children: React.ReactElement<NJFabProps> | React.ReactElement<NJFabProps>[];
/**
* Where the menu should expand to
*/
dataPlacement?: 'top' | 'bottom' | 'left' | 'right';
/**
* Control opened state
*/
opened?: boolean;
/**
* Callback when open state changes
*/
onOpen?: (open: boolean) => void;
/**
* Initial opened state (uncontrolled)
*/
initialOpened?: boolean;
/**
* Whether to open the menu on hover
*/
openOnHover?: boolean;
/**
* Title attribute for the FAB button
*/
title?: string;
/**
* Whether the FAB menu is disabled
*/
disabled?: boolean;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
};
export type NJFabMenuProps = WithHTMLAttributes<NJFabMenuOwnProps, 'div'>;
export {};