UNPKG

rc-target-size

Version:

a tool help get size of element for React, support higher-order component and component render.

19 lines (15 loc) 331 B
/* eslint-disable */ import React from 'react' import { TargetSize } from 'rc-target-size' const App = () => ( <div> <TargetSize> {({ width, height }) => ( <div style={{ height: 100 }}> callback - size of me: {width}x{height} </div> )} </TargetSize> </div> ) export default App