qwik-copy-text
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

⌗ 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

Prop Type Requirement Description
isDisabled boolean required hide/show the component true or false
htmlContent string required html to rich text
styles object optional object of React style

Contributing

Feel free to submit any issues or pull request 🙂

Package Sidebar

Install

npm i qwik-copy-text

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

90.6 kB

Total Files

16

Last publish

Collaborators

  • mousom