summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Button.tsx23
-rw-r--r--src/components/Header.tsx20
2 files changed, 43 insertions, 0 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
new file mode 100644
index 0000000..55ceda6
--- /dev/null
+++ b/src/components/Button.tsx
@@ -0,0 +1,23 @@
+import React from 'react';
+
+interface Props {
+ variant?: 'contained' | 'outlined'
+ children: string;
+}
+
+
+const styles = {
+ contained: "bg-black text-white",
+ outlined: "border-2 border-black"
+};
+
+const Button: React.FC<Props> = ({ children, variant = 'contained' }) => {
+
+ return (
+ <button className={`p-4 m-3 font-bold tracking-wide hover:underline focus:outline-none ${styles[variant]}`}>
+ {children}
+ </button>
+ );
+};
+
+export default Button;
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
new file mode 100644
index 0000000..e61ac63
--- /dev/null
+++ b/src/components/Header.tsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+interface Props {
+ navigation: {
+ name: string;
+ route: string;
+ }[];
+}
+
+const Header: React.FC<Props> = ({ children, navigation }) => {
+ return (
+ <header className="bg-black text-white flex">
+ {navigation.map(({ name, route }) => (
+ <a href={route} className="py-6 px-8 font-bold tracking-wide hover:underline">{name}</a>
+ ))}
+ </header>
+ );
+};
+
+export default Header;