@wooritech/code-board-react
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0-alpha.8 • Public • Published

    CodeBoardReact

    React Component that wraps CodeBoard

    install

    npm i @wooritech/code-board @wooritech/code-board-react
    

    usage

    import React, { useRef, useEffect } from "react";
    import { CodeBoardReact } from '@wooritech/code-board-react'
    import { PresetType } from '@wooritech/code-board/lib/types'
    import "@wooritech/code-board/lib/style.css";
     
    const App = () => {
        const cpreset = {
          name: "demo",
          type: PresetType.STATIC,
          files: {
            "indexs.js": {
              content: 'console.log("hi");'
            }
          } 
        };
     
        const cconfig = {
          isFixedTemplate: true
        }
      
        return (
          <div className="App">
            <CodeBoardReact preset={cpreset} config={cconfig} />
          </div>
        );
      };
      
      export default App;
      

    style

    The style is not applied by default. Please use "@wooritech/code-board/lib/style.css" or copy it to customize.

    Install

    npm i @wooritech/code-board-react

    DownloadsWeekly Downloads

    15

    Version

    1.0.0-alpha.8

    License

    ISC

    Unpacked Size

    4.48 kB

    Total Files

    10

    Last publish

    Collaborators

    • onlydel
    • sykim1009
    • tea7day
    • zerosheepmoo