@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
56 lines (50 loc) • 2.57 kB
JavaScript
import { React, PropTypes } from '@gravityforms/libraries';
const { forwardRef } = React;
/**
* @module WordPressLogo
* @description The WordPress logo.
*
* @since 4.2.4
*
* @param {object} props Component props.
* @param {number} props.height The height of the logo.
* @param {string} props.title The title of the logo.
* @param {number} props.width The width of the logo.
* @param {object|null} ref Ref to the component.
*
* @return {JSX.Element} The svg component.
* @example
* import WordPressLogo from '@gravityforms/components/react/admin/elements/Svgs/WordPressLogo';
*
* return (
* <WordPressLogo height={ 44 } width={ 44 } />
* );
*
*/
const WordPressLogo = forwardRef( ( {
height = 44,
title = '',
width = 44,
}, ref ) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } viewBox="0 0 92 92" fill="none" ref={ ref }>
{ title !== '' && <title>{ title }</title> }
<rect width="92" height="92" fill="#F1F1F1" rx="46" />
<g clipPath="url(#clip0_5509_147580)">
<path fill="#535353" d="M19.379 46c0 10.56 6.064 19.656 14.918 23.924L21.74 35.218c-1.46 3.37-2.36 6.965-2.36 10.782Zm44.591-1.349c0-3.255-1.236-5.618-2.247-7.3-1.349-2.248-2.583-4.044-2.583-6.29 0-2.47 1.91-4.717 4.495-4.717h.337C59.252 21.964 52.963 19.38 46 19.38a27.03 27.03 0 0 0-22.239 12.018h1.686c2.81 0 7.076-.337 7.076-.337 1.46-.112 1.573 2.02.224 2.247 0 0-1.46.225-3.032.225l9.66 28.753 5.84-17.41L41.06 33.53l-2.809-.22c-1.46-.113-1.236-2.248.112-2.248 0 0 4.38.337 6.964.337 2.81 0 7.075-.337 7.075-.337 1.461-.113 1.574 2.02.225 2.247 0 0-1.46.225-3.032.225l9.658 28.644 2.713-8.874c1.124-3.706 2.02-6.289 2.02-8.649l-.015-.004Zm-17.52 3.707-7.975 23.14c2.358.674 4.94 1.123 7.525 1.123 3.145 0 6.064-.581 8.874-1.46-.113-.113-.113-.225-.225-.338l-8.2-22.465Zm22.912-15.049.225 2.713c0 2.712-.45 5.73-2.02 9.548l-8.088 23.475c7.863-4.606 13.253-13.142 13.253-23.026-.113-4.605-1.349-8.873-3.372-12.69l.002-.02ZM46 15c-17.073 0-31 13.927-31 31s13.927 31 31 31 31-13.927 31-31-13.927-31-31-31Zm0 60.651C29.713 75.651 16.46 62.4 16.46 46A29.586 29.586 0 0 1 46 16.46 29.586 29.586 0 0 1 75.54 46c0 16.399-13.253 29.651-29.54 29.651Z" />
</g>
<defs>
<clipPath id="clip0_5509_147580">
<path fill="#fff" d="M15 15h62v62H15z" />
</clipPath>
</defs>
</svg>
);
} );
WordPressLogo.propTypes = {
height: PropTypes.number,
title: PropTypes.string,
width: PropTypes.number,
};
WordPressLogo.displayName = 'Svgs/WordPressLogo';
export default WordPressLogo;