liber-salti
Version:
Saltí - Liber Design System
98 lines (97 loc) • 2.38 kB
TypeScript
import { ReactNode } from 'react';
import { IconName } from 'Icon/Icon.types';
export interface SidebarProps {
/**
* If `true` the collapsable list is open.
*/
open?: boolean;
/**
* The expand button callback.
*/
handleToggle?: () => void;
/**
* The list items that will appear on the component.
*/
children?: ReactNode;
/**
* Horizontal logo.
*/
logo?: string;
/**
* Collapsed logo.
*/
smallLogo?: string;
/**
* The label of the button that compresses the sidebar.
*/
compressLabel?: {
open: string;
close: string;
};
/**
* Top margin to be used when not on mobile.
*/
marginTop?: number;
/**
* Company name.
*/
name?: string;
/**
* If `true` the bottom list item will be selected.
*/
profileSelected?: boolean;
/**
* Footer settings.
*/
userSettings: {
/**
* Image on the footer avatar.
*/
avatar?: string;
/**
* Icon of the footer avatar (overrides `avatar` prop).
*/
avatarIcon?: IconName;
/**
* The text that will apear on the footer.
*/
primaryText: string;
/**
* The secondary text that will appear on the footer.
*/
secondaryText?: string;
/**
* The menu items on the footer.
*/
menu: {
/**
* The ARIA label of the menu item.
*/
ariaLabel?: string;
/**
* Label of the footer menu item.
*/
label: string;
/**
* Icon of the footer menu item.
*/
iconName?: IconName;
/**
* If `true`, a divider is shown above the menu item.
*/
divider?: boolean;
/**
* Callback of the footer menu item.
*/
onClick?: () => void;
/**
* Href of the footer menu item.
*/
href?: string;
/**
* Selected state of the footer menu item.
*/
selected?: boolean;
}[];
};
}