JSFiddle - React, Tailwind, and code Playground
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>
}