Type alias ButtonProps

ButtonProps: {
    componentProps?: PressableProps;
    disableDesignPadding?: boolean;
    disabled?: boolean;
    dismissKeyboardOnPress?: boolean;
    forwardRef?: Ref<View>;
    icon?: CarbonIcon;
    iconOnlyMode?: boolean;
    kind?: "primary" | "secondary" | "tertiary" | "danger" | "ghost" | "danger-tertiary" | "danger-ghost";
    onLongPress?: ((event) => void);
    onPress?: ((event) => void);
    overrideColor?: string;
    style?: StyleProp<ViewStyle>;
    text: string;
    textType?: TextTypes;
}

Props for Button component

Type declaration

  • Optional componentProps?: PressableProps

    Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this.

  • Optional disableDesignPadding?: boolean

    Disable extra padding on right of buttons

  • Optional disabled?: boolean

    Indicate if button is disabled

  • Optional dismissKeyboardOnPress?: boolean

    Indicate if keyboard should be dismissed onPress

  • Optional forwardRef?: Ref<View>

    Ref property for parent

  • Optional icon?: CarbonIcon

    Icon to render (size 20)

  • Optional iconOnlyMode?: boolean

    Indicate if icon only mode should be used (text is not rendered)

  • Optional kind?: "primary" | "secondary" | "tertiary" | "danger" | "ghost" | "danger-tertiary" | "danger-ghost"

    Button kind. Primary is default

  • Optional onLongPress?: ((event) => void)
      • (event): void
      • onLongPress event

        Parameters

        • event: GestureResponderEvent

        Returns void

  • Optional onPress?: ((event) => void)
      • (event): void
      • onPress event

        Parameters

        • event: GestureResponderEvent

        Returns void

  • Optional overrideColor?: string

    Override text icon and border color for edge cases

  • Optional style?: StyleProp<ViewStyle>

    Style to set on the item

  • text: string

    Text to render (for iconOnlyMode use descriptive text)

  • Optional textType?: TextTypes

    Text type to render (Standard is default)

Generated using TypeDoc