import React, { type ReactNode } from 'react'; import { classNames } from '../../utils'; import styles from './ActionBar.module.css'; import type { IconName } from '../Icon'; import { Button } from '../Button'; import { useId } from '../../hooks/useId'; import type { Placement } from '@floating-ui/react'; import { Tooltip } from '../Tooltip'; export type Action = { text: string; onClick: () => void; iconName?: IconName; isDisabled?: boolean; isLoading?: boolean; tooltipContent?: string; tooltipPlacement?: Placement; }; export type ActionBarProps = { /** * className for the element */ className?: string; /** * Content positioned on the left side of the ActionBar */ children: ReactNode; /** * List of actions for the user to perform */ actions: Action[]; }; /** * List of actions for the user to perform */ export const ActionBar = ({ className, children, actions }: ActionBarProps) => { const labelId = useId(); return (

{children}

{actions.map((action) => { return (
  • ); })}
    ); }; /** * List of actions for the user to perform */ export const FloatingActionBar = (props: ActionBarProps) => { return (
    ); };