Compare commits

..

No commits in common. 'fc1a845427af518ba3226d372f01050df5d7a065' and 'f2639f4fc87ee893490af2eed192ac90d2536e97' have entirely different histories.

@ -1,16 +1,10 @@
import { Button } from "./components/Button";
import Alert from "./components/Alert";
function handleOnClick() {
console.log("Clicked");
}
function App() {
return (
<div>
<Button onClick={handleOnClick} color="success">My Button</Button>
<Alert>Hello <strong>Marx</strong></Alert>
</div>
);
}

@ -1,13 +0,0 @@
interface Props {
children: string;
color?: 'primary' | 'secondary' | 'success';
onClick: () => void;
}
export const Button = ({ children, color='primary', onClick }: Props) => {
//const buttonType = "btn " + "btn"+"-"+{type};
return (
<button type="button" className={'btn btn-'+color} onClick={onClick}>{children}</button>
)
}
Loading…
Cancel
Save