diff --git a/index.html b/index.html index 5016fc3..41804b9 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -12,8 +12,12 @@ /> - Smart Shopping List + CollabShop +
diff --git a/src/api/useAuth.jsx b/src/api/useAuth.jsx index ca07ae6..a659720 100644 --- a/src/api/useAuth.jsx +++ b/src/api/useAuth.jsx @@ -20,8 +20,9 @@ export const SignInButton = () => ( /** * A button that signs the user out of the app using Firebase Auth. */ -export const SignOutButton = () => ( - ); diff --git a/src/components/IconButton.jsx b/src/components/IconButton.jsx new file mode 100644 index 0000000..29c1011 --- /dev/null +++ b/src/components/IconButton.jsx @@ -0,0 +1,15 @@ +import '../views/Layout.css'; + +export function IconButton({ + as: Component = 'button', + icon, + label, + ...props +}) { + return ( + + {icon && }
+ {label && {label}} +
+ ); +} diff --git a/src/views/Layout.css b/src/views/Layout.css index 85be734..5492ae8 100644 --- a/src/views/Layout.css +++ b/src/views/Layout.css @@ -57,7 +57,8 @@ .Nav-link { --color-text: var(--color-accent); - + background: none; + border: none; color: var(--color-text); font-size: 1.4em; flex: 0 1 auto; @@ -70,4 +71,5 @@ .Nav-link.active { text-decoration-thickness: 0.22em; text-underline-offset: 0.1em; + background-color: var(--color-border); } diff --git a/src/views/Layout.jsx b/src/views/Layout.jsx index a905bb8..e5bb54e 100644 --- a/src/views/Layout.jsx +++ b/src/views/Layout.jsx @@ -1,5 +1,5 @@ -import { NavLink, Outlet } from 'react-router-dom'; - +import { Outlet, NavLink } from 'react-router-dom'; +import { IconButton } from '../components/IconButton'; import './Layout.css'; import { auth } from '../api/config.js'; import { useAuth, SignInButton, SignOutButton } from '../api/useAuth.jsx'; @@ -21,8 +21,7 @@ export function Layout() {

Smart shopping list

{!!user ? (
- Signed in as {auth.currentUser.displayName} ( - ) + Signed in as {auth.currentUser.displayName}
) : ( @@ -33,15 +32,26 @@ export function Layout() {