function Modal({ title, children }) {
return (
<div style={styles.modal}>
<h2 style={styles.title}>
{props.title}
</h2>
<section style={styles.content}>
{props.children}
</section>
</div>
);
}
const styles = {
modal: { ... },
title: { ... },
content: { ... },
};
render(
<Modal title="Reloj">
<Timer
time={new Date() + 1000}
/>
</Modal>,
document.body
);