@ark-ui/solid
Version:
A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.
26 lines (23 loc) • 909 B
TypeScript
import * as solid_js from 'solid-js';
import * as presence from '@zag-js/presence';
import { O as Optional, M as MaybeAccessor } from './types-Bc0WfPsv.js';
import { R as RenderStrategyProps } from './render-strategy-B5MqQP3X.js';
interface UsePresenceProps extends Optional<presence.Props, 'present'>, RenderStrategyProps {
/**
* Whether to allow the initial presence animation.
* @default false
*/
skipAnimationOnMount?: boolean;
}
interface UsePresenceReturn extends ReturnType<typeof usePresence> {
}
declare const usePresence: (props: MaybeAccessor<UsePresenceProps>) => solid_js.Accessor<{
unmounted: boolean | undefined;
present: boolean;
ref: (node: HTMLElement | null) => void;
presenceProps: {
hidden: boolean;
'data-state': string | undefined;
};
}>;
export { type UsePresenceProps as U, type UsePresenceReturn as a, usePresence as u };