0.1.0-beta.14 • Published 2 years ago

react-kotlin-playground v0.1.0-beta.14

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

React Kotlin Playground

npm dependencies dependencies downloads

React wrapper for kotlin-playground widget.

Install

npm i --save react-kotlin-playground kotlin-playground

Usage

import React from "react";
import ReactDOM from "react-dom";
import KotlinPlayground from "react-kotlin-playground";
// For modern bundle:
// import KotlinPlayground from 'react-kotlin-playground/es';

ReactDOM.render(
    <KotlinPlayground mode="kotlin">
        fun main(args: Array&lt;String&gt;){" "}
        {
            //sampleStart
            println("Hello World")
            //sampleEnd
        }
    </KotlinPlayground>,
    container
);

API

NameTypeDefaultDescription
classNamestringnullAdd classes for codewrapper
childrennodeInitial source code for run

Plus all options and events from original library:

in react props style - without data- prefix and in camelCase, like

<KotlinPlayground
    autoIndent={2}
    targetPlatform="js"
    {/* ...and any other */ }
>...</KotlinPlayground>

or in html attrs style - like in original library:

<KotlinPlayground
    auto-indent={2}
    data-target-platform="js"
    {/* ...and any other */ }
>...</KotlinPlayground>

More props options

Acknowledgements

Develop By MIT license

0.1.0-beta.14

2 years ago

0.1.0-beta.13

2 years ago

0.1.0-beta.12

2 years ago

0.1.0-beta.11

2 years ago

0.1.0-beta.10

4 years ago

0.1.0-beta.9

4 years ago

0.1.0-beta.8

4 years ago

0.1.0-beta.5

4 years ago

0.1.0-beta.7

4 years ago

0.1.0-beta.6

4 years ago

0.1.0-beta.4

5 years ago

0.1.0-beta.3

5 years ago

0.1.0-beta.2

5 years ago

0.1.0-beta.1

5 years ago