Skip to content

Instantly share code, notes, and snippets.

View kakonbarman's full-sized avatar

Kakon Barman kakonbarman

  • Rangpur
View GitHub Profile
@kakonbarman
kakonbarman / 1. render-css.js
Created June 28, 2022 15:08 — forked from codersantosh/1. render-css.js
React Component for Internal CSS
/*STYLIS : https://www.npmjs.com/package/stylis*/
import {compile, serialize, stringify, middleware, prefixer} from 'stylis';
/*Process the Raw CSS*/
const getProcessedCss = (rawCss) =>{
return serialize(compile(rawCss), middleware([prefixer, stringify]))
}
/*Render CSS inside style tag*/
const RenderCss = (props) => {