- Perth Office: 3/16 Harman Street Belmont WA 6104
- ABN : 57 668 264 640
- ACN # 668264640
import React, { useEffect, useState } from "react"; import { __ } from "@wordpress/i18n"; import { useSelector } from 'react-redux'; import { Snackbar } from "@wordpress/components"; const EditGoogleVariationItem = ({ id, variation }) => { const getFontWeightTitle = ( weight ) => { if ( undefined === weight ) { weight = '400'; } let updatedWeight = weight, oldWeight = weight; if ( 'italic' === weight ) { oldWeight = '400italic'; } if ( oldWeight.includes('italic') ) { updatedWeight = `${oldWeight.replace('italic', '')} ` + __( 'Italic', 'custom-fonts' ); } switch ( weight ) { case '100': case '100italic': return __( 'Thin ', 'custom-fonts' ) + updatedWeight; case '200': case '200italic': return __( 'Extra Light ', 'custom-fonts' ) + updatedWeight; case '300': case '300italic': return __( 'Light ', 'custom-fonts' ) + updatedWeight; case '400': case '400italic': return __( 'Regular ', 'custom-fonts' ) + updatedWeight; case '500': case '500italic': return __( 'Medium ', 'custom-fonts' ) + updatedWeight; case '600': case '600italic': return __( 'Semi Bold ', 'custom-fonts' ) + updatedWeight; case '700': case '700italic': return __( 'Bold ', 'custom-fonts' ) + updatedWeight; case '800': case '800italic': return __( 'Extra Bold ', 'custom-fonts' ) + updatedWeight; case '900': case '900italic': return __( 'Ultra-Bold ', 'custom-fonts' ) + updatedWeight; default: return updatedWeight; } } return (
{__( 'Edit Font', 'custom-fonts' )}