0.2.0 • Published 2 years ago

qwik-copy-text v0.2.0

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

⌗ qwik-copy-text

A react text copy component to easily copy html as rich text format in clipboard. ✨

npm version

code style: prettier

Features

  • Hassle free html to rich formatted text 🥳
  • Lightweight ⚡
  • Easy to use 🐥
  • fully customizable style ⚒️

Install

Via package managers:

$ npm i qwik-copy-text
$ yarn add qwik-copy-text

Example Usage

import QwikCopy from 'qwik-copy-text'
// custom style !optional
 const style = {
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    width: '20px',
    height: '20px',
    padding: '10px',
    background: '#5784f5',
    color: '#fff',
    fontSize: '20px',
    border: 'none',
    outline: 'none',
    borderRadius: '10px',
    cursor: 'pointer',
  }


 <QwikCopy 
 isDisabled={false}
 styles={style} 
 htmlContent={`<h1> Hello from qwikcopy! </h1>`} 
 />

Props

PropTypeRequirementDescription
isDisabledbooleanrequiredhide/show the component true or false
htmlContentstringrequiredhtml to rich text
stylesobjectoptionalobject of React style

Contributing

Feel free to submit any issues or pull request 🙂