0.2.0 • Published 5 years ago

saber-plugin-copy-code v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

saber-plugin-code-copy

Copy code to clipboard.

Install

yarn add saber-plugin-code-copy

Usage

In your saber-config.yml:

plugins:
  - resolve: saber-plugin-code-copy

Options

statusAttribute

  • Type: string
  • Default: title

By default the title attribute of the button is set to Copy, when code is copied we update it to Copied, you can specify another attribute name if you want, e.g. aria-label.

buttonStyle

  • Type: object
  • Default: undefined

Assign custom style to the Copy button, e.g.:

{
  backgroundColor: 'red'
}

License

MIT.