@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
60 lines • 2.62 kB
TypeScript
/**
* Copyright (c) Paymium.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root of this projects source tree.
*/
import { ComponentProps, RefAttributes } from 'react';
import { CrossedMethods } from '@crossed/styled';
import { View } from 'react-native';
import { Floating } from './Floating';
import { Placement } from '@floating-ui/react';
export type PopoverConfigContext = {
showSheet?: boolean;
triggerStrategy: 'onPointerEnter' | 'onPress';
};
export declare const PopoverConfigProvider: (props: PopoverConfigContext & {
children: React.ReactNode;
}) => import("react/jsx-runtime").JSX.Element, usePopoverConfig: () => PopoverConfigContext;
type RootProps = ComponentProps<typeof Floating> & {
placement?: Placement;
offsetValue?: number;
};
export declare const Root: import("react").MemoExoticComponent<({ children, placement, triggerStrategy, offsetValue, ...props }: RootProps) => import("react/jsx-runtime").JSX.Element>;
export declare const Trigger: import("react").NamedExoticComponent<Omit<import("../Slot").SlotProps<import("react-native").PressableProps>, "style" | "Comp"> & {
style?: CrossedMethods<any>;
} & RefAttributes<View>>;
export declare const Content: import("react").NamedExoticComponent<{
style?: CrossedMethods<any>;
} & {
children?: import("react").ReactNode | undefined;
} & RefAttributes<View>>;
export declare const Popover: import("react").NamedExoticComponent<Omit<{
children?: import("react").ReactNode | undefined;
} & {
closeOverlayPress?: boolean;
removeScroll?: boolean;
wait?: number;
defaultValue?: boolean;
value?: boolean;
onChange?: (_p: boolean) => void;
portal?: boolean;
} & Partial<Pick<import("./Floating/context").FloatingConfig, "triggerStrategy" | "enabled">> & RefAttributes<import("./Floating").FloatingRef> & {
placement?: Placement;
offsetValue?: number;
}, "ref"> & {
ref?: import("react").Ref<import("./Floating").FloatingRef>;
}> & {
readonly type: ({ children, placement, triggerStrategy, offsetValue, ...props }: RootProps) => import("react/jsx-runtime").JSX.Element;
} & {
Trigger: import("react").NamedExoticComponent<Omit<import("../Slot").SlotProps<import("react-native").PressableProps>, "style" | "Comp"> & {
style?: CrossedMethods<any>;
} & RefAttributes<View>>;
Content: import("react").NamedExoticComponent<{
style?: CrossedMethods<any>;
} & {
children?: import("react").ReactNode | undefined;
} & RefAttributes<View>>;
};
export {};
//# sourceMappingURL=Popover.d.ts.map