Skip to content

Commit

Permalink
Add sample button component (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedirt committed Jan 22, 2025
1 parent ef328e8 commit d23f879
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions browser-extensions/chrome/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import React from 'react';
import '../styles/tailwind.css';
import Button from './Button';

const App: React.FC = () => {
const handleClick = () => {
alert('Button clicked!');
};

return (
<div className="bg-blue-500 text-white p-4">
<h1>Hello, AliasVault Chrome Extension!</h1>
<div className="mt-4">
<Button onClick={handleClick}>
Click me!
</Button>
</div>
</div>
);
};
Expand Down
19 changes: 19 additions & 0 deletions browser-extensions/chrome/src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';

interface ButtonProps {
onClick: () => void;
children: React.ReactNode;
}

const Button: React.FC<ButtonProps> = ({ onClick, children }) => {
return (
<button
className="bg-white text-blue-500 px-4 py-2 rounded hover:bg-blue-100 transition-colors"
onClick={onClick}
>
{children}
</button>
);
};

export default Button;

0 comments on commit d23f879

Please sign in to comment.