import { MeasuredView, ViewMeasurements } from "../../utils/MeasuredView" import { Spacer } from "../Spacer" import { useColor } from "../../hooks" import { useState } from "react" import { PressableProps, TextStyle } from "react-native" import { GestureResponderEvent, Pressable } from "react-native" import Haptic, { HapticFeedbackTypes } from "react-native-haptic-feedback" import { config } from "react-spring" // @ts-ignore import { animated, Spring } from "react-spring/renderprops-native" import styled from "styled-components/native" import { Box, BoxProps } from "../Box" import { Flex } from "../Flex" import { Spinner } from "../Spinner" import { Text, useTextStyleForPalette } from "../Text" export interface ButtonProps extends BoxProps { children: React.ReactNode size?: "small" | "large" variant?: | "fillDark" | "fillLight" | "fillGray" | "fillSuccess" | "outline" | "outlineGray" | "outlineLight" | "text" onPress?: PressableProps["onPress"] icon?: React.ReactNode iconPosition?: "left" | "left-start" | "right" /** * `haptic` can be used like: *