react-code-samples
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

react-code-samples

usage example:

import {} from 'react-code-samples';
import 'highlight.js/styles/default.css'; // or use another highlight js style

<Snippet
  code={[
    {
      code: `
            console.log("hello world");
            `,
      language: 'javascript',
    },
    {
      code: `
              println!("Hello, world!");
            `,
      language: 'rust',
    },
    {
      code: `
              fmt.Println("Hello, world!")
            `,
      language: 'go',
    },
  ]}
  style={{
    width: '100%',
    height: '100%',
  }}
/>;

Readme

Keywords

none

Package Sidebar

Install

npm i react-code-samples

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

24.3 kB

Total Files

15

Last publish

Collaborators

  • pt5