UNPKG

@gravityforms/components

Version:

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

62 lines (56 loc) 2.35 kB
import { React, PropTypes } from '@gravityforms/libraries'; const { forwardRef } = React; /** * @module PostmarkLogo * @description The Postmark 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 PostmarkLogo from '@gravityforms/components/react/admin/elements/Svgs/PostmarkLogo'; * * return ( * <PostmarkLogo height={ 44 } width={ 44 } /> * ); * */ const PostmarkLogo = forwardRef( ( { height = 44, title = '', width = 44, }, ref ) => { return ( <svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } fill="none" viewBox="4 3 92 92" ref={ ref }> { title !== '' && <title>{ title }</title> } <g filter="url(#filter0_d_3041_90643)"> <rect width="92" height="92" x="4" y="3" fill="#FFDE00" rx="46" /> <path fill="#000" d="M32.135 66.58h2.608c1.34 0 2.186-.86 2.186-2.223V33.961c0-1.362-.846-2.222-2.186-2.222h-2.608V25H51.03c10.152 0 18.19 5.233 18.19 15.198 0 10.036-8.038 15.27-18.19 15.27h-6.487v8.89c0 1.361.846 2.221 2.256 2.221h5.288v6.811H32.135v-6.81Zm18.33-18.138c6.698 0 10.576-2.867 10.576-8.1 0-5.377-3.877-8.101-10.575-8.101h-5.923v16.273h5.922v-.072Z" /> </g> <defs> <filter id="filter0_d_3041_90643" width="100" height="100" x="0" y="0" 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_3041_90643" /> <feBlend in="SourceGraphic" in2="effect1_dropShadow_3041_90643" result="shape" /> </filter> </defs> </svg> ); } ); PostmarkLogo.propTypes = { height: PropTypes.number, title: PropTypes.string, width: PropTypes.number, }; PostmarkLogo.displayName = 'Svgs/PostmarkLogo'; export default PostmarkLogo;