Every line of 'react fontsize' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
109 get fontSize() { 110 return this._label.fontSize; 111 }
39 value: function _getFontSize() { 40 var single = this.props.single; 41 42 return single ? this.props.size / 1.7 : (this.props.size - 5) / 2; 43 }
22 onChange(e) { 23 var sliderVal = e.target.value, 24 fraction = sliderVal / 100, 25 fontSize; 26 27 if (fraction < 0.1) { 28 fontSize = 49; 29 } 30 else { 31 fontSize = 100 * fraction; 32 } 33 34 this.setState({fontSize: fontSize}); 35 }
85 function getFontSizeValue({ theme, value }) { 86 const size = fontSize(value)({ theme }); 87 if (size) { 88 return `${size}em`; 89 } 90 return value; 91 }
11 export function styleTypographyFontSize({ v, device, state }) { 12 const fontSize = defaultValueValue({ 13 v, 14 key: "fontSize", 15 device, 16 state 17 }); 18 19 return fontSize; 20 }
61 public get fontSize(): Size { 62 return this._fontSize; 63 }
20 getFontSize() { 21 return Math.max(10, this.options.value.fontSize); 22 }
51 getFontSize(){ 52 return this.style.fontSize; 53 }
85 export function setFontSize(value, button) { 86 if (value) { 87 document.documentElement.style.setProperty('font-size', value); 88 setStorageItem('fontsize', value); 89 } else { 90 document.documentElement.style.removeProperty('font-size'); 91 removeStorageItem('fontsize'); 92 } 93 if (button) { 94 button.setAttribute('aria-pressed', value ? 'true' : 'false'); 95 } 96 }
50 getFontSize(element) { 51 let fontSizeString = window.getComputedStyle(element).fontSize; 52 let fontSize = parseFloat(fontSizeString); 53 return fontSize; 54 }