Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/546669204/react-copyable
https://github.com/546669204/react-copyable
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/546669204/react-copyable
- Owner: 546669204
- License: mit
- Created: 2022-12-30T12:41:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-30T12:51:50.000Z (about 2 years ago)
- Last Synced: 2024-11-07T11:23:52.610Z (2 months ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-copyable
## 使用
```tsx
const CopyableComponent = Copyable({
copy({value}){
return value
},
paste({onChange},data){
onChange({...data})
}
})const MyComponent = ({value,onChange})=>{
return onChange(e.target.value)}/>
}export default CopyableComponent(MyComponent);
```
待补充。