@atlaskit/select
Version:
Select allows users to make a single selection or multiple selections from a list of options.
23 lines (22 loc) • 947 B
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import { type ReactNode, type Ref } from 'react';
import { type OptionType } from '../types';
import type { PopupSelectHandle, PopupSelectProps } from './popup-select';
/**
* The `[along, away]` offset the legacy popper gave for `popperProps.modifiers`.
*
* Legacy PopupSelect spreads `popperProps` over its defaults, so a consumer `modifiers` value
* replaces the default list, with its `[0, 8]` offset. Only a consumer offset modifier then sets
* the offset. Popper ignores a popper v1 `modifiers` object, so that gives `[0, 0]` too.
*
* Exported for tests only.
*/
export declare function getLegacyOffset({ modifiers }: {
modifiers: unknown;
}): [number, number];
export declare const PopupSelectTopLayer: <Option = OptionType, IsMulti extends boolean = false, Modifiers = unknown>(props: PopupSelectProps<Option, IsMulti, Modifiers> & {
ref?: Ref<PopupSelectHandle>;
}) => ReactNode;