Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
565 B

import { Button, Spinner } from 'native-base';
import PropTypes from 'prop-types';
import React from 'react';
import { StyleSheet } from 'react-native';
export default function LoadingButton({ loading = false, style, children, ...props }) {
return (
<Button style={styles.button} {...props}>
{children}
{loading ? <Spinner /> : null}
</Button>
);
}
LoadingButton.propTypes = {
...Button.propTypes,
loading: PropTypes.bool.isRequired,
};
const styles = StyleSheet.create({
button: { marginTop: 20, marginBottom: 30, height: 30 },
});