@td-design/react-native
Version:
react-native UI组件库
24 lines • 705 B
JavaScript
import React, { memo } from 'react';
import Animated, { useAnimatedStyle } from 'react-native-reanimated';
import { useTheme } from '@shopify/restyle';
import SvgIcon from '../svg-icon';
import { mix } from '../utils/redash';
const Chevron = _ref => {
let {
progress
} = _ref;
const theme = useTheme();
const style = useAnimatedStyle(() => ({
transform: [{
rotateZ: `${mix(progress.value, 0, Math.PI)}rad`
}]
}));
return /*#__PURE__*/React.createElement(Animated.View, {
style: style
}, /*#__PURE__*/React.createElement(SvgIcon, {
name: "down",
color: theme.colors.gray500
}));
};
export default /*#__PURE__*/memo(Chevron);
//# sourceMappingURL=Chevron.js.map