@awsui/components-react
Version:
AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A
58 lines (57 loc) • 1.76 kB
TypeScript
import { BaseComponentProps } from '../internal/base-component';
import { CancelableEventHandler, NonCancelableEventHandler } from '../internal/events';
export interface SideNavigationProps extends BaseComponentProps {
header?: SideNavigationProps.Header;
activeHref?: string;
items?: ReadonlyArray<SideNavigationProps.Item>;
onFollow?: CancelableEventHandler<SideNavigationProps.FollowDetail>;
onChange?: NonCancelableEventHandler<SideNavigationProps.ChangeDetail>;
}
export declare namespace SideNavigationProps {
interface Header {
text: string;
href: string;
}
interface Divider {
type: 'divider';
}
interface Link {
type: 'link';
text: string;
href: string;
external?: boolean;
info?: React.ReactNode;
}
interface Section {
type: 'section';
text: string;
items: ReadonlyArray<Item>;
defaultExpanded?: boolean;
}
interface LinkGroup {
type: 'link-group';
text: string;
href: string;
items: ReadonlyArray<Item>;
}
interface ExpandableLinkGroup {
type: 'expandable-link-group';
text: string;
href: string;
items: ReadonlyArray<Item>;
defaultExpanded?: boolean;
}
type Item = Divider | Link | Section | LinkGroup | ExpandableLinkGroup;
interface ChangeDetail {
item: Section | ExpandableLinkGroup;
expanded: boolean;
expandableParents: ReadonlyArray<Section | ExpandableLinkGroup>;
}
interface FollowDetail {
text: string;
href: string;
type?: 'link' | 'link-group' | 'expandable-link-group';
external?: boolean;
info?: React.ReactNode;
}
}