@weareluastudio/react-custom-gist
v0.1.2
Published
Embedded gist on a custom iFrame with syntax color theme, you can select 'Monokai | Solarized | Chaos | Cobalt | Idle Fingers | Obsidian ...' as theme
Downloads
2
Readme
👌 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
| Name | Type | Default | Optional | |-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|----------| | src | string | | false | | style | CSSProperties | undefined | true | | theme | monokaisolarized-lightsolarized-darkchaoscobaltidle-fingersobsidianone-darkpastel-on-darkterminaltomorrow-nighttwilight | monokai | true |
You can see all themes and styles here
LICENSE MIT
All rights reserved LUA Development Studio ®