UNPKG

@gravityforms/components

Version:

UI components for use in Gravity Forms development. Both React and vanilla js flavors.

65 lines (59 loc) 2.33 kB
import { React, PropTypes } from '@gravityforms/libraries'; const { forwardRef } = React; /** * @module SendGridLogo * @description The SendGrid 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 SendGridLogo from '@gravityforms/components/react/admin/elements/Svgs/SendGridLogo'; * * return ( * <SendGridLogo height={ 44 } width={ 44 } /> * ); * */ const SendGridLogo = forwardRef( ( { height = 44, title = '', width = 44, }, ref ) => { return ( <svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } viewBox="4 3.043 92 92" fill="none" ref={ ref }> { title !== '' && <title>{ title }</title> } <g filter="url(#filter0_d_2944_85289)"> <rect width="92" height="92" x="4" y="3.043" fill="#294661" rx="46" /> <path fill="#A3E1F2" d="M25 40.04v17.003h16.998V74.04h17.003v-34H25Z" /> <path fill="#1A82E2" d="M41.998 57.044H25v16.998h16.998V57.044Z" /> <path fill="#00B3E3" d="M58.998 40.04V23.042H41.996V57.043h34V40.04H58.998Z" /> <path fill="#1A82E2" d="M76 23.043H59.002v16.998H76V23.043ZM42.131 40.173h17.131v17.131H42.131z" /> </g> <defs> <filter id="filter0_d_2944_85289" width="100" height="100" x="0" y=".043" 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_85289" /> <feBlend in="SourceGraphic" in2="effect1_dropShadow_2944_85289" result="shape" /> </filter> </defs> </svg> ); } ); SendGridLogo.propTypes = { height: PropTypes.number, title: PropTypes.string, width: PropTypes.number, }; SendGridLogo.displayName = 'Svgs/SendGridLogo'; export default SendGridLogo;