holder-web-approval

0.0.6 • Public • Published

Welcome to react-text-width-auto 👋

Version License: ISC

文本宽度自适应组件

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

Package Sidebar

Install

npm i holder-web-approval

Weekly Downloads

2

Version

0.0.6

License

ISC

Unpacked Size

14.5 kB

Total Files

11

Last publish

Collaborators

  • npmiboy