@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
65 lines (59 loc) • 2.28 kB
JavaScript
import { React, PropTypes } from '@gravityforms/libraries';
const { forwardRef } = React;
/**
* @module MicrosoftLogo
* @description The Microsoft 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 MicrosoftLogo from '@gravityforms/components/react/admin/elements/Svgs/MicrosoftLogo';
*
* return (
* <MicrosoftLogo height={ 44 } width={ 44 } />
* );
*
*/
const MicrosoftLogo = forwardRef( ( {
height = 44,
title = '',
width = 44,
}, ref ) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } viewBox="4 3.042 92 92" fill="none" ref={ ref }>
{ title !== '' && <title>{ title }</title> }
<g filter="url(#filter0_d_2944_85253)">
<rect width="92" height="92" x="4" y="3.042" fill="#F1F1F1" rx="46" />
<path fill="#F1511B" d="M48.862 47.904H27V26.042h21.862v21.862Z" />
<path fill="#80CC28" d="M73 47.904H51.138V26.042H73v21.862Z" />
<path fill="#07A6F0" d="M48.861 72.05H27V50.19h21.861V72.05Z" />
<path fill="#FBBC09" d="M73 72.05H51.138V50.19H73V72.05Z" />
</g>
<defs>
<filter id="filter0_d_2944_85253" width="100" height="100" x="0" y=".042" colorInterpolationFilters="sRGB" filterUnits="userSpaceOnUse">
<feFlood floodOpacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" />
<feOffset dy="1" />
<feGaussianBlur stdDeviation="2" />
<feColorMatrix values="0 0 0 0 0.0687866 0 0 0 0 0.097585 0 0 0 0 0.37981 0 0 0 0.0779552 0" />
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2944_85253" />
<feBlend in="SourceGraphic" in2="effect1_dropShadow_2944_85253" result="shape" />
</filter>
</defs>
</svg>
);
} );
MicrosoftLogo.propTypes = {
height: PropTypes.number,
title: PropTypes.string,
width: PropTypes.number,
};
MicrosoftLogo.displayName = 'Svgs/MicrosoftLogo';
export default MicrosoftLogo;