forked from M3-Academy/desafio-react-e-typescript
feat: adiciona elemento opicional
This commit is contained in:
parent
6853415cf7
commit
40fd6246dc
@ -0,0 +1,18 @@
|
||||
interface OptionElementProps {
|
||||
title: string;
|
||||
children?: any;
|
||||
h2Class?: string;
|
||||
}
|
||||
|
||||
export function OptionElement({
|
||||
title,
|
||||
children,
|
||||
h2Class,
|
||||
}: OptionElementProps) {
|
||||
return (
|
||||
<>
|
||||
<h2 className={h2Class ?? ""}>{title}</h2>
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user