0.0.6 • Published 2 years ago

react-text-width-auto v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

文本宽度自适应组件

Install

npm install

Start

npm run dev

Run Build

npm run build

Use

import WidthAutoLabel from 'react-text-width-auto/src/index';

可通过设置外部容器的color来设置自适应后的文本颜色,如下:

<div 
    style={{
        width: 100,
        height: 32,
        fontSize: '14px',
        fontWeight: 'bold',
        border: '1px solid #f00',
        color: red
    }}
>
    <WidthAutoLabel>测试文本宽度自适应标签组件</WidthAutoLabel>
</div>

Result

pic.png

pic1.png

Author

👤 jacky010

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator