Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ const ActionButton = props => {

useEffect(() => {
if (props.active) {
Animated.spring(anim.current, { toValue: 1 }).start();
Animated.spring(anim.current, { toValue: 1, useNativeDriver: false },).start();
setActive(true);
setResetToken(props.resetToken);
} else {
props.onReset && props.onReset();

Animated.spring(anim.current, { toValue: 0 }).start();
Animated.spring(anim.current, { toValue: 0, useNativeDriver: false }).start();
timeout.current = setTimeout(() => {
setActive(false);
setResetToken(props.resetToken);
Expand Down Expand Up @@ -254,7 +254,7 @@ const ActionButton = props => {
if (active) return reset(animate);

if (animate) {
Animated.spring(anim.current, { toValue: 1 }).start();
Animated.spring(anim.current, { toValue: 1, useNativeDriver: false }).start();
} else {
anim.current.setValue(1);
}
Expand All @@ -266,7 +266,7 @@ const ActionButton = props => {
if (props.onReset) props.onReset();

if (animate) {
Animated.spring(anim.current, { toValue: 0 }).start();
Animated.spring(anim.current, { toValue: 0, useNativeDriver: false }).start();
} else {
anim.current.setValue(0);
}
Expand Down
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as React from 'react'
import {
ViewStyle,
ViewProperties,
ViewProps,
TextStyle
} from 'react-native'


export interface ActionButtonProperties extends ViewProperties {
export interface ActionButtonProperties extends ViewProps {
resetToken?: any,
active?: boolean,

Expand Down Expand Up @@ -40,7 +40,7 @@ export interface ActionButtonProperties extends ViewProperties {
nativeFeedbackRippleColor?: string
}

export interface ActionButtonItemProperties extends ViewProperties {
export interface ActionButtonItemProperties extends ViewProps {
size?: number,
title?: string
onPress?: () => void
Expand Down