text: import React from 'react';
  import { ActivityIndicator } from 'react-native';
  import PropTypes from 'prop-types';
  
  import { Container, Text } from './styles';
  
  export default function Button({ disabled, children, loading, ...rest }) {
    return (
      <Container disabled={disabled} {...rest}>
        {loading ? (
          <ActivityIndicator size="small" color="#FFF" />
        ) : (
          <Text>{children}</Text>
        )}
      </Container>
    );
  }
  
  Button.propTypes = {
    disabled: PropTypes.bool,
    children: PropTypes.string.isRequired,
    loading: PropTypes.bool,
  };
  
  Button.defaultProps = {
    disabled: false,
    loading: false,
  };
  