1.1.8 • Published 2 years ago

cn-react-coda v1.1.8

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

Node.js CI Build Status Coverage Status Codacy Badge License: MIT

A simple react component to write code snippets

Install

npm install cn-react-coda

How to use?

import React from "react"
import { Coda } from "cn-react-coda"

const example = `
  function fn(){
    console.log("Hello world!")
  }
`

export default function App(){
  return (
    <Coda lang="js" theme="dark" title="example.js" code={example} />
  )
}

Properties

NameTypeDefaultRequiredDescription
codestringnullyesCode snippet to be showed
titlestringnullnoSnippet title
themestring (dark, light)darknoComponent theme
langstringjsxnoPrograming language, too see all suppport see hightlight.js

What's inside

Development

Test

npm run test

Build

npm run build

Lint

npm run lint

License

MIT © C4co

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.0.3

3 years ago