RotationView

Last Updated on : 2024-06-05 03:14:34download

Overview

RotationView is a view container that encapsulates the animation that needs to be rotated.

Code demo

Note: for more information, see Demo.

You can set whether the container rotates by passing in the active property.

import { RotationView } from "tuya-panel-kit"; <RotationView active={this.state.active}> <View style={styles.wrApperStyle}> <TYText style={{ textAlign: "center" }}>Rotation! ! ! </TYText> </View> </RotationView>;

API

style

RotationView style.

Type Required
ViewPropTypes.style No

active

Whether to enable the rotation animation.

Type Required Default value
bool No true

duration

The time of one rotation of the animation in milliseconds.

Type Required Default value
number No 5000

useNativeDriver

Whether to use the native animation driver.

Type Required Default value
bool No false

children

Nested child elements of RotationView.

Type Required
PropTypes.node No