Download react-instantsearch/examples/react-native/src/components/Spinner.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 615 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-native/src/components/Spinner.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-native/src/components/Spinner.js
-
curl -L -o Spinner.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-instantsearch/examples/react-native/src/components/Spinner.js
615 Bytes
| import React from 'react'; | |
| import { ActivityIndicator, View, Dimensions } from 'react-native'; | |
| import { connectStateResults } from 'react-instantsearch-native'; | |
| const { width, height } = Dimensions.get('window'); | |
| export default connectStateResults(({ searching, props }) => { | |
| const left = props.left ? props.left : 0; | |
| const bottom = props.bottom ? props.bottom : height - 20; | |
| return ( | |
| <View | |
| style={{ | |
| position: 'absolute', | |
| left: width - left, | |
| bottom: height - bottom, | |
| zIndex: 2, | |
| }} | |
| > | |
| <ActivityIndicator animating={searching} /> | |
| </View> | |
| ); | |
| }); | |