@rc-component/overflow
v1.0.2
Published
📦 Auto-collapse React layout primitive for rendering visible items and overflow indicators.
Readme
亮点
| 方向 | 支持 |
| ---- | ------------------------------------------------- |
| 定位 | 用于自动折叠可见项与溢出项的 React 布局基础组件。 |
| 包名 | @rc-component/overflow |
| 发布 | @rc-component/np / rc-np |
安装
npm install @rc-component/overflow用法
import Overflow from '@rc-component/overflow';
export default () => (
<Overflow
data={[1, 2, 3]}
renderItem={item => <span>{item}</span>}
renderRest={items => <span>+{items.length}</span>}
/>
);API
| 名称 | 说明 |
| ------------ | ----------------------- |
| data | Overflow 渲染的数据项。 |
| renderItem | 渲染可见项。 |
| renderRest | 渲染折叠后的溢出项。 |
本地开发
npm install
npm start
npm test
npm run lint
npm run tsc
npm run compile本地 dumi 站点默认运行在 http://localhost:8000.
发布
npm run prepublishOnly发布流程通过 @rc-component/np 提供的 rc-np 命令处理。
许可证
@rc-component/overflow 基于 MIT 协议发布。
