@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
72 lines (66 loc) • 2.42 kB
JavaScript
import { React, PropTypes } from '@gravityforms/libraries';
const { forwardRef } = React;
/**
* @module Plug
* @description The Plug logo.
*
* @since 2.3.1
*
* @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 Plug from '@gravityforms/components/react/admin/elements/Svgs/Plug';
*
* return (
* <Plug height={ 44 } width={ 44 } />
* );
*
*/
const Plug = forwardRef( ( {
height = 44,
title = '',
width = 44,
}, ref ) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } viewBox="0 0 44 44" fill="none" ref={ ref }>
{ title !== '' && <title>{ title }</title> }
<rect width={ 44 } height={ 44 } rx={ 22 } fill="#F1F1F1" />
<g clipPath="url(#clip0_2869_112429)">
<path
d="M27.1233 23.5799L30.7208 18.919C31.3181 18.1452 31.2765 17.09 30.6283 16.5743C29.9801 16.0586 28.9611 16.2698 28.3638 17.0436L24.7662 21.7044L27.1233 23.5799Z"
fill="#0F3D6C"
/>
<path
d="M16.5406 15.3957C16.169 15.1108 15.6378 15.1752 15.3451 15.5407V15.5407C13.0304 18.4314 12.6829 22.1547 14.2193 24.7821L13.9996 25.0565C13.5361 25.6353 13.5684 26.4246 14.0714 26.8105L15.2908 27.7457L12.7624 30.9033C12.2988 31.4823 12.3311 32.2716 12.8342 32.6574L13.139 32.8912C13.642 33.277 14.4329 33.119 14.8964 32.5401L17.4249 29.3825L18.6444 30.3177C19.1474 30.7036 19.9382 30.5456 20.4018 29.9667L20.7273 29.5602C23.6174 30.176 27.0074 28.9383 29.2165 26.1795V26.1795C29.5056 25.8184 29.4416 25.2903 29.0745 25.0088L16.5406 15.3957Z"
fill="#0F3D6C"
/>
<path
d="M20.5595 18.5407L24.1571 13.8799C24.7544 13.106 24.7128 12.0509 24.0646 11.5352C23.4164 11.0194 22.3973 11.2306 21.8 12.0045L18.2024 16.6653L20.5595 18.5407Z"
fill="#0F3D6C"
/>
</g>
<defs>
<clipPath id="clip0_2869_112429">
<rect
width={ 23.913 }
height={ 23.913 }
fill="white"
transform="translate(10.0435 10.0435)"
/>
</clipPath>
</defs>
</svg>
);
} );
Plug.propTypes = {
height: PropTypes.number,
title: PropTypes.string,
width: PropTypes.number,
};
Plug.displayName = 'Svgs/Plug';
export default Plug;