@c8s/code-block

[![github](https://badgen.net/badge//nju33,c8s/000?icon=github&list=1)](https://github.com/nju33/c8s/tree/master/components/code-block) [![npm:version](https://badgen.net/npm/v/@c8s/code-block?icon=npm&label=)](https://www.npmjs.com/package/@c8s/code-bloc

Usage no npm install needed!

<script type="module">
  import c8sCodeBlock from 'https://cdn.skypack.dev/@c8s/code-block';
</script>

README

@c8s/code-block

github npm:version typescript license browserslist code style:prettier

Usage

/**
 * As to prepare of using the `CodeBlock`
 * 
 * ```sh
 * yarn add @c8s/code-block @c8s/theme react @types/react styled-components @types/styled-components
 * ```
 */
import CodeBlock from '@c8s/code-block';
import {Theme, theme} from '@c8s/theme';

Example

() => (
  <Theme theme={theme}>
    {/* ... */}
      <CodeBlock lang="jsx">{`
class Example extends React.Component {
  render() {
    return <Youtube videoId="psQkDS3zqRg" />
  }
}
      `}</CodeBlock>
    {/* ... */}
  </Theme>
);

Contributors

Thanks goes to these wonderful people (emoji key):



📖

Aki-Japan

📖

This project follows the all-contributors specification. Contributions of any kind welcome!