Skip to content

Commit

Permalink
adds icons to header drop down menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Lailo committed Jun 3, 2020
1 parent 1859723 commit 2bc4dc4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
18 changes: 8 additions & 10 deletions src/components/layout/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import dynamic from 'next/dynamic'
import Dropdown from '@components/Dropdown'
import routes from '@utils/routes'
import { FiMoreHorizontal } from 'react-icons/fi'
import { AiOutlineFontColors } from 'react-icons/ai'
import { MdFeaturedPlayList } from 'react-icons/md'

const ThemeSwitch = dynamic(() => import('@components/layout/ThemeSwitch'), {
ssr: false,
Expand Down Expand Up @@ -34,23 +36,19 @@ const AppHeader: React.FC<Props> = ({ className }) => {
</div>
<div>
<Dropdown buttonLabel={<FiMoreHorizontal />}>
<ul className="w-40 space-y-4 py-2">
<ul className="w-40 space-y-4 py-2 text-sm">
<li>
<Link {...routes.COMPONENTS}>
<a
className="text-green-600 hover:underline"
title="components"
>
<a className="text-primary hover:underline" title="components">
<MdFeaturedPlayList className="inline mr-2" />
Components
</a>
</Link>
</li>
<li>
<Link {...routes.TYPOGRAPHY}>
<a
className="text-green-600 hover:underline"
title="Typography"
>
<a className="text-primary hover:underline" title="Typography">
<AiOutlineFontColors className="inline mr-2" />
Typography
</a>
</Link>
Expand All @@ -59,7 +57,7 @@ const AppHeader: React.FC<Props> = ({ className }) => {
<hr className="dark:border-gray-700" />
</li>
<li className="flex items-center justify-between">
<span className="mr-auto text-sm text-gray-600">Theme</span>
<span className="mr-auto text-gray-600">Theme</span>
<ThemeSwitch />
</li>
</ul>
Expand Down
14 changes: 10 additions & 4 deletions src/components/layout/__snapshots__/AppHeader.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@ exports[`AppHeader matches snapshot 1`] = `
buttonLabel={<FiMoreHorizontal />}
>
<ul
className="w-40 space-y-4 py-2"
className="w-40 space-y-4 py-2 text-sm"
>
<li>
<Link
as="/components"
href="/components"
>
<a
className="text-green-600 hover:underline"
className="text-primary hover:underline"
title="components"
>
<MdFeaturedPlayList
className="inline mr-2"
/>
Components
</a>
</Link>
Expand All @@ -45,9 +48,12 @@ exports[`AppHeader matches snapshot 1`] = `
href="/typography"
>
<a
className="text-green-600 hover:underline"
className="text-primary hover:underline"
title="Typography"
>
<AiOutlineFontColors
className="inline mr-2"
/>
Typography
</a>
</Link>
Expand All @@ -61,7 +67,7 @@ exports[`AppHeader matches snapshot 1`] = `
className="flex items-center justify-between"
>
<span
className="mr-auto text-sm text-gray-600"
className="mr-auto text-gray-600"
>
Theme
</span>
Expand Down

1 comment on commit 2bc4dc4

@vercel
Copy link

@vercel vercel bot commented on 2bc4dc4 Jun 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.