@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
33 lines • 1.5 kB
TypeScript
interface PrimaryRegistration<Props> {
type: 'primary';
discoveredProps: Array<Props>;
}
interface SecondaryRegistration<Props> {
type: 'secondary';
update: (props: Props) => void;
}
export type RegistrationState<Props> = PrimaryRegistration<Props> | SecondaryRegistration<Props>;
type RegistrationType = RegistrationState<unknown>['type'];
type RegistrationChangeHandler<Props> = (registration: PrimaryRegistration<Props> | SecondaryRegistration<Props>) => void;
interface RegistrationInternal<Props> {
forceType: RegistrationType | undefined;
props: Props;
secondaryInstance: SecondaryRegistration<Props>;
onChange: (registration: PrimaryRegistration<Props> | SecondaryRegistration<Props>) => void;
}
export interface AppLayoutWidgetApiInternal<Props = unknown> {
register(forceDeduplicationType: RegistrationType | undefined, onPropsChange: RegistrationChangeHandler<Props>): () => void;
getStateForTesting(): {
registrations: Array<RegistrationInternal<Props>>;
};
}
export declare class AppLayoutWidgetController<Props = unknown> {
#private;
register: (forceType: RegistrationType | undefined, onRegistrationChange: RegistrationChangeHandler<Props>) => (() => void);
getStateForTesting: () => {
registrations: RegistrationInternal<Props>[];
};
installInternal: (internalApi?: Partial<AppLayoutWidgetApiInternal<Props>>) => AppLayoutWidgetApiInternal<Props>;
}
export {};
//# sourceMappingURL=app-layout-widget.d.ts.map