@atlaskit/primitives
Version:
Primitives are token-backed low-level building blocks.
25 lines (24 loc) • 959 B
TypeScript
import { type ReactElement, type ReactNode } from 'react';
import { type BoxProps } from './box';
export type PressableProps = Omit<BoxProps<'button'>, 'disabled' | 'as' | 'children' | 'role' | 'style'> & {
/**
* `children` should be defined to ensure buttons are not empty,
* because they should have labels.
*/
children: ReactNode;
isDisabled?: boolean;
};
type PressableComponent = (props: PressableProps, displayName: string) => ReactElement | null;
/**
* __UNSAFE_PRESSABLE__
*
* @internal Still under development. Do not use.
*
* A Pressable is a primitive component that renders a `<button>`.
*
* - [Examples](https://atlassian.design/components/primitives/pressable/examples)
* - [Code](https://atlassian.design/components/primitives/pressable/code)
* - [Usage](https://atlassian.design/components/primitives/pressable/usage)
*/
declare const UNSAFE_PRESSABLE: PressableComponent;
export default UNSAFE_PRESSABLE;