@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
50 lines (44 loc) • 2.34 kB
JavaScript
import { React, PropTypes } from '@gravityforms/libraries';
const { forwardRef } = React;
/**
* @module GravityTextLogo
* @description The Gravity text logo.
*
* @since 6.3.0
*
* @param {object} props Component props.
* @param {number} props.height The height of the logo.
* @param {string} props.primaryFill The primary fill color.
* @param {string} props.title The title of the logo.
* @param {number} props.width The width of the logo.
*
* @return {JSX.Element} The text component.
* @example
* import GravityTextLogo from '@gravityforms/components/react/admin/elements/Svgs/GravityTextLogo';
*
* return (
* <GravityTextLogo height={ 19 } width={ 120 } />
* );
*
*/
const GravityTextLogo = forwardRef( ( {
height = 19,
primaryFill = '#1B2A45',
title = '',
width = 120,
}, ref ) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width={ width } height={ height } fill="none" viewBox="0 0 120 19" ref={ ref }>
{ title !== '' && <title>{ title }</title> }
<path fill={ primaryFill } d="M9.233 0c3.591 0 7.182 1.693 8.208 5.9h-3.795c-.924-1.745-2.36-2.412-4.413-2.412-3.385 0-5.283 2.514-5.283 5.745 0 3.386 2.052 5.695 5.283 5.695 2.463 0 4.31-.718 5.08-3.437H9.387V8.26h8.464c.102 1.693.05 3.386-.565 5.027-1.385 3.591-4.617 5.13-8.054 5.13C4.463 18.416 0 15.184 0 9.233 0 3.232 4.463 0 9.233 0Zm49.145 17.596v.512h-4.002l-1.436-2.975H45.4l-1.386 2.975h-4.001v-.512L48.323.052h1.795l8.26 17.544Zm5.54-11.645 2 4.411h.102v-.05l1.899-4.36L70.33.256h4.104V.82l-7.695 17.287h-1.59L57.403.821V.257h4.104l2.411 5.694Zm18.057 12.157h-3.847V.154h3.847v17.954ZM100.904 3.54H95.21v14.568h-3.745V3.54H85.72V.205h15.184V3.54ZM29.958.154c4.104 0 6.361 2.975 6.361 6.156 0 2.257-1.18 4.258-3.231 5.284l4.052 5.95v.514h-4.104l-3.693-5.9H26.11v5.9h-3.847V.154h7.694Zm79.718 3.847 1.693 3.437h.103l1.795-3.54 2.154-3.693h4.104V.77l-6.207 10.157v7.13h-3.847v-7.13L103.264.77V.205h4.155l2.257 3.796ZM46.63 11.952h5.027l-2.513-5.9-2.514 5.9ZM26.06 9.028h3.847c1.642 0 2.667-1.23 2.667-2.77 0-1.487-1.025-2.718-2.667-2.718H26.06v5.488Z" />
</svg>
);
} );
GravityTextLogo.propTypes = {
height: PropTypes.number,
primaryFill: PropTypes.string,
title: PropTypes.string,
width: PropTypes.number,
};
GravityTextLogo.displayName = 'Svgs/GravityTextLogo';
export default GravityTextLogo;