0.1.3 • Published 4 years ago

react-custom-gist v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

👌 Share awesome gist

yarn:

    yarn add --save react-custom-gist

npm:

    npm i --save react-custom-gist

✍️ Using

The default theme is Monokai

    // App.tsx
    import React from 'react';
    import Gist from 'react-custom-gist'

    const App:React.FC = () => {
        const url:string = 'your gist url'
        return <Gist src={url}/>
    }

    export default App

choose your theme

    // App.tsx
    import React from 'react';
    import Gist from 'react-custom-gist'

    const App:React.FC = () => {
        const url:string = 'your gist url'
        return <Gist src={url} theme='solarized-light'/>
    }

    export default App

choose your styles

    // App.tsx
    import React from 'react';
    import Gist from 'react-custom-gist'

    const App:React.FC = () => {
        const url:string = 'your gist url'
        return <Gist src={url} theme='solarized-light' style={{border:'none'}}/>
    }

    export default App

And thats it!, just add your git url to render a gist on your app. A special feature of this gist its the content based height.

🛠 Props

NameTypeDefaultOptional
srcstringfalse
styleCSSPropertiesundefinedtrue
thememonokaisolarized-lightsolarized-darkchaoscobaltidle-fingersobsidianone-darkpastel-on-darkterminaltomorrow-nighttwilightmonokaitrue

You can see all themes and styles here

LICENSE MIT

All rights reserved LUA Development Studio ®

0.1.3

4 years ago