Skip to content

linyxria/react-scale-adjust

Repository files navigation

react-scale-adjust

scale-adjust 的 React 封装

安装

pnpm add react-scale-adjust

使用

import { Scaler } from '../lib/main'

const App = () => {
  return (
    <div style={{ width: '60vw', height: '47vh', backgroundColor: 'darkcyan' }}>
      <Scaler
        width={1920}
        height={1080}
        onScale={(scale) => {
          console.log('scale:', scale)
        }}
        style={{ background: 'orange' }}
      >
        Hello, world!
      </Scaler>
    </div>
  )
}

export default App

About

scale-adjust 的 React 封装

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published