File size: 708 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import { Button, Gridicon } from '@automattic/components';
import { useTranslate } from 'i18n-calypso';
import PropTypes from 'prop-types';
function EmailProviderFeaturesToggleButton( { handleClick, isRelatedContentExpanded } ) {
const translate = useTranslate();
return (
<Button className="email-provider-features__toggle-button" onClick={ handleClick }>
<span>{ translate( 'Learn more' ) }</span>
<Gridicon icon={ isRelatedContentExpanded ? 'chevron-up' : 'chevron-down' } />
</Button>
);
}
EmailProviderFeaturesToggleButton.propTypes = {
handleClick: PropTypes.func.isRequired,
isRelatedContentExpanded: PropTypes.bool.isRequired,
};
export default EmailProviderFeaturesToggleButton;
|