yaml-code-block
v1.0.1
Published
Lightweight package that neatly displays yml in a code block
Downloads
1
Readme
yaml-code-block
Package that neatly displays yml in a code block
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