Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Adds and exports ButtonType enum for type prop #315

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import * as React from 'react';

declare module 'react-native-swipeout' {
export enum ButtonType {
default = "default",
delete = "delete",
primary = "primary",
secondary = "secondary"
}

export interface SwipeoutButtonProperties {
backgroundColor?: string;
color?: string;
component?: JSX.Element;
onPress?(): void;
text?: React.ReactNode;
type?: 'default'|'delete'|'primary'|'secondary';
type?: ButtonType | keyof typeof ButtonType;
underlayColor?: string;
disabled?: boolean;
}
Expand Down