简体   繁体   English

如何在 react-native-paper 中使图标旋转?

[英]How to make icon spin in react-native-paper?

I am having this react-native-paper button:我有这个react-native-paper按钮:

      <Button
        disabled={loading}
        icon="refresh"
        mode="contained"
        onPress={this.refreshData.bind(this)}
      >
        Refresh
      </Button>

How can I make the icon spin when loading=true ?如何在loading=true时使图标旋转?

for the spinning icon do this.对于旋转图标,请执行此操作。

declare one variable refreshing any boolean value when data refresh value set to be true and icon spinning start.当数据刷新值设置为 true 并且图标开始旋转时,声明一个变量refreshing任何布尔值。

      <Button
        loading={loading}
        disabled={loading}
        icon="refresh"
        mode="contained"
        onPress={this.refreshData.bind(this)}
      >
        Refresh
      </Button>

react-native-paper button have props like.. loading it's simply spinning icon react-native-paper 按钮有类似的道具..加载它只是旋转图标

here snack link这里小吃链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 react native:Searchbar的背景(react-native-paper) - react native: background of Searchbar (react-native-paper) React Native react-native-paper 按钮具有更大的高度 - React native react-native-paper button with greater height 如何使用 react-native-paper Modal 从下到上生成模态 animation? - How to produce a modal bottom to top animation with react-native-paper Modal? 如何将 css 应用于<text>内部组件<card.content> react-native-paper 中的组件?</card.content></text> - How to apply css to the <Text> component inside <Card.Content> component from react-native-paper? React-Native-Paper 主题不会使用自定义字体 - React-Native-Paper Theme won't use Custom Fonts ZIndex 仅与 Android 中的任何 react-native-paper 组件重叠 - ZIndex overlapping with any react-native-paper component in Android only 未聚焦时更改边框线 colors (react-native-paper) - Change border line colors when unfocused (react-native-paper) 如何在 react-native-paper 中将 Appbar.Header 中的标题居中? - How can I center the title in Appbar.Header in react-native-paper? 减少 react-native-paper TextInput 的高度和垂直填充 - Reduce height and vertical padding for a react-native-paper TextInput React-native 与故事书问题 react-native-vector-icons 和 react-native-paper - React-native with storybook problem react-native-vector-icons and react-native-paper
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM