1.0.0 • Published 6 years ago
luban-expend-collapse-arrow v1.0.0
Prefix named Luban, salute the God of craftsman
usage
To avoid redundant code and for maximum style flexibility, all colors(such as bg color, font-color) must be defined by yourself in css style
npm i luban-expend-collapse-arrow --save
or
yarn add luban-expend-collapse-arrow --save
import * as React from 'react';
import Arrow from 'luban-expend-collapse-arrow'
const Demo = () => {
const onchange = (e) => {
console.log(e)
}
return (
<div>
<Arrow onClick={onchange} color='red' defaultExpend={false}/>
</div>
)
}
export default React.memo(Demo);
Props:
- className?: string
- onClick?: Function
- color?: string , arrow color, default #666
- defaultExpend?: boolean
1.0.0
6 years ago