nvest-trading-view

0.0.752 • Public • Published

nvest-trading-view

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save nvest-trading-view

Usage

import React from 'react'
 
import { TradingViewChart } from 'nvest-trading-view'
import 'nvest-trading-view/dist/index.css'
 
const App = () => {
  const size = useRef();
  const [heightWidth, setHeightWidth] = useState({x:0, y:0})
  useEffect(()=>{
    !size.current.offsetWidth?console.log():setHeightWidth({x: size.current?.offsetWidth, y: size.current?.offsetHeight })
  },[size.current?.offsetWidth])
  return (
    <div style = {{height: '100vh', width: '100vw'}} ref{size} className="App">
      {heightWidth.x === 0?<></>:<TradingViewChart height={heightWidth.y} width{heightWidth.x}/>}
    </div>
  );
}
 
export default App
 

License

MIT © shailesh

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.752
    1
    • latest

Version History

Package Sidebar

Install

npm i nvest-trading-view

Weekly Downloads

1

Version

0.0.752

License

MIT

Unpacked Size

521 kB

Total Files

18

Last publish

Collaborators

  • shailesh00010111