@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
18 lines (17 loc) • 539 B
TypeScript
/**
* Returns the `fallbackWidth` if the provided `defaultWidthProp` is not an integer value.
*/
export declare function useSafeDefaultWidth({ defaultWidthProp, fallbackDefaultWidth, slotName, }: {
/**
* The `defaultWidth` passed in by the app.
*/
defaultWidthProp: number;
/**
* The fallback value for `defaultWidth` if `defaultWidthProp` is invalid.
*/
fallbackDefaultWidth: number;
/**
* The name of the slot, used for the dev-time console error.
*/
slotName: string;
}): number;