diff --git a/packages/rn-tester/js/examples/PixelRatio/PixelRatioExample.js b/packages/rn-tester/js/examples/PixelRatio/PixelRatioExample.js index 15d5ec154ee784..a2954aa0e40b8c 100644 --- a/packages/rn-tester/js/examples/PixelRatio/PixelRatioExample.js +++ b/packages/rn-tester/js/examples/PixelRatio/PixelRatioExample.js @@ -11,10 +11,12 @@ 'use strict'; import RNTesterText from '../../components/RNTesterText'; +import {RNTesterThemeContext} from '../../components/RNTesterTheme'; import React, {useState} from 'react'; import {Button, PixelRatio, StyleSheet, TextInput, View} from 'react-native'; function LayoutSizeToPixel() { + const theme = React.useContext(RNTesterThemeContext); const [layoutDPSize, setLayoutDPSize] = useState(0); const pixelSize = PixelRatio.getPixelSizeForLayoutSize( layoutDPSize ? layoutDPSize : 0, @@ -33,7 +35,10 @@ function LayoutSizeToPixel() { Layout Size(dp):{' '}