1.0.1 • Published 2 years ago

yaml-code-block v1.0.1

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

yaml-code-block

Package that neatly displays yml in a code block

NPM JavaScript Style Guide

Install

npm install --save yaml-code-block

Usage

import React, { Component } from 'react'

import YamlCodeBlock, { YamlCodeBlockProps } from 'YamlCodeBlock'
yamlData,
  (showLineNumbers = false),
  (font = 'monospace'),
  (fontColor = '#3f515f'),
  (backgroundColor = '#f0f0f0')
class Example extends Component {
  inputProps: YamlCodeBlockProps = {
    yamlData = myData,
    showLineNumbers = true, // Optional
    font = 'monospace', // Optional
    fontColor = '#3f515f', // Optional
    backgroundColor = '#f0f0f0' // Optional
  }
  render() {
    return <YamlCodeBlock {...inputProps} />
  }
}

Demo Storybook

Explore our components in Storybook: View Storybook

License

MIT © JosephBarkate

1.0.1

2 years ago

1.0.0

2 years ago