Verwendung

Add a gesture to a reusable view.

tsx
// Add a gesture to a reusable view.
import { Box, tap, type GestureProps, type KuitoNode } from 'kuito';

// A card that takes the caller's gestures beside its own.
function Card(props: GestureProps & { onOpen: () => void; children: KuitoNode }) {
  return (
    <Box gestures={[tap({ onEnd: props.onOpen }), ...(props.gestures ?? [])]} padding={16}>
      {props.children}
    </Box>
  );
}

Typdeklaration

ts
export interface GestureProps {
  /** The view's gestures; several race unless composed with together or orElse. */
  gestures?: readonly Composable[];
}

Mitglieder 1

NameTypErforderlichBeschreibung
gesturesreadonly Composable[]NeinThe view's gestures; several race unless composed with together or orElse.
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.