JSFiddle - React, Tailwind, and code Playground

by Kenneth Luplau-Brøgger

TypeScript

const Modal = () => {};

const contentByEditType = (type, render) => {
	switch(type) {
    case true:
      return render("sandt")
    default:
      return render("dunno")
  }
}

contentByEditType(1 > 0, (component) => {
	return <Modal>{ component }</Modal>
}