Skip to content

Commit

Permalink
Add tooltips and alt attributes to Header and Home components
Browse files Browse the repository at this point in the history
  • Loading branch information
PandeCode committed Mar 3, 2023
1 parent d8173fa commit c047556
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function HeaderSimple({ links }: HeaderSimpleProps) {
return (
<Header height={60} style={{ position: "absolute", top: 0, left: 0 }}>
<Container className={classes.header}>
<img width={32} height={32} src="https://pandecode.github.io/anode/favicon-32x32.png" />
<img width={32} height={32} alt="Anode" src="https://pandecode.github.io/anode/favicon-32x32.png" />
<Group spacing={5} className={classes.links}>
{links.map((link) => (
<a
Expand Down Expand Up @@ -143,6 +143,7 @@ export default function HeaderSimple({ links }: HeaderSimpleProps) {
<Menu opened={opened}>
<Menu.Target>
<Burger
title="Menu"
opened={opened}
onClick={toggle}
className={classes.burger}
Expand Down
36 changes: 20 additions & 16 deletions src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Popover,
Text,
TextInput,
Tooltip,
} from "@mantine/core";
import {
IconArrowLeft,
Expand Down Expand Up @@ -133,22 +134,25 @@ export default function Home({ }: HomeProps) {
}}
>
<Flex gap={"md"}>
<ActionIcon
onClick={() => {
setType("ANIME");
setTypeChooserOpen(false);
}}
>
<IconDeviceTv />{" "}
</ActionIcon>
<ActionIcon
onClick={() => {
setType("MANGA");
setTypeChooserOpen(false);
}}
>
<IconBook />{" "}
</ActionIcon>
<Tooltip label="Select Type" withArrow>
<ActionIcon
title="Select Type"
onClick={() => {
setType("ANIME");
setTypeChooserOpen(false);
}}
>
<IconDeviceTv />{" "}
</ActionIcon>
<ActionIcon
onClick={() => {
setType("MANGA");
setTypeChooserOpen(false);
}}
>
<IconBook />{" "}
</ActionIcon>
</Tooltip>
</Flex>
</Popover.Dropdown>
</Popover>
Expand Down

0 comments on commit c047556

Please sign in to comment.