MCPcopy Create free account
hub / github.com/react/react / isSameFont

Function isSameFont

packages/react-art/src/ReactFiberConfigART.js:108–122  ·  view source on GitHub ↗
(oldFont, newFont)

Source from the content-addressed store, hash-verified

106}
107
108function isSameFont(oldFont, newFont) {
109 if (oldFont === newFont) {
110 return true;
111 } else if (typeof newFont === 'string' || typeof oldFont === 'string') {
112 return false;
113 } else {
114 return (
115 newFont.fontSize === oldFont.fontSize &&
116 newFont.fontStyle === oldFont.fontStyle &&
117 newFont.fontVariant === oldFont.fontVariant &&
118 newFont.fontWeight === oldFont.fontWeight &&
119 newFont.fontFamily === oldFont.fontFamily
120 );
121 }
122}
123
124/** Render Methods */
125

Callers 1

applyTextPropsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected