@payfit/unity-components
Version:
68 lines (67 loc) • 2.36 kB
TypeScript
import { PropsWithChildren } from 'react';
export declare const actionBarRoot: import('tailwind-variants').TVReturnType<{
isVisible: {
true: string[];
false: string[];
};
position: {
absolute: string[];
fixed: string[];
};
}, undefined, string[], {
isVisible: {
true: string[];
false: string[];
};
position: {
absolute: string[];
fixed: string[];
};
}, undefined, import('tailwind-variants').TVReturnType<{
isVisible: {
true: string[];
false: string[];
};
position: {
absolute: string[];
fixed: string[];
};
}, undefined, string[], unknown, unknown, undefined>>;
export interface ActionBarRootProps extends PropsWithChildren {
/** Offset from the bottom of the table. It uses Unity's standard spacing tokens. */
offsetBottom?: '$25' | '$50' | '$75' | '$100' | '$125' | '$200' | '$300' | '$400' | '$500' | '$600' | '$800' | '$1000' | number;
/**
* Control the visibility of the Action bar root, which will in turn hide and show the action bar
* @default false
*/
isVisible?: boolean;
/**
* The positioning mode to use:
* - `absolute` will place the root at the bottom-center of the closest parent with `position: relative`
* - `fixed` will place the root at the bottom-center of the viewport
* @default "absolute"
*/
position?: 'absolute' | 'fixed';
}
/**
* The ActionBarRoot component provides positioning context for ActionBar components.
* It positions the ActionBar absolutely within a table container.
* @param {ActionBarRootProps} props - The props for the ActionBarRoot component
* @example
* ```tsx
* import { ActionBarRoot, ActionBar } from '@payfit/unity-components'
*
* function Example() {
* return (
* <ActionBarRoot>
* <ActionBar selectionCount={2} onClearSelection={handleClear}>
* </ActionBar>
* </ActionBarRoot>
* )
* }
* ```
* @see {@link ActionBarRootProps} for all available props
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/action-bar GitHub}
*/
declare const ActionBarRoot: import('react').ForwardRefExoticComponent<ActionBarRootProps & import('react').RefAttributes<HTMLDivElement>>;
export { ActionBarRoot };