@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
32 lines (31 loc) • 1.08 kB
TypeScript
import { ReactNode } from 'react';
import { CommonProps } from '../../types';
/** Props for {@link Toolbar} */
export interface ToolbarProps<T extends string> extends CommonProps {
/** Name of {@link ToolbarPanel} that should be visible */
activePanel: T;
children: ReactNode;
}
/**
* Component that allow to show rows of buttons and support animation change between multiple
* rows.
*
* ```tsx
* import { Toolbar, ToolbarPanel, Button } from 'ui-kit';
*
* <Toolbar activePanel="default">
* <ToolbarPanel name="default">
* <ToolbarButton>Import</ToolbarButton>
* <ToolbarButton>Add manually</ToolbarButton>
* <ToolbarButton>New group</ToolbarButton>
* </ToolbarPanel>
* <ToolbarPanel name="selectedRows">
* <ToolbarButton>Merge</ToolbarButton>
* <ToolbarButton>Export</ToolbarButton>
* <ToolbarButton>Share with subaccounts</ToolbarButton>
* <ToolbarButton>Delete</ToolbarButton>
* </ToolbarPanel>
* </Toolbar>
* ```
*/
export declare function Toolbar<T extends string>(props: ToolbarProps<T>): JSX.Element;