Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
{
"name": "18.x",
"branch": "branch/v18",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

revert back before merging

"branch": "travis.rodgers/tooltip-test",
"isDefault": true
},
{
Expand Down
14 changes: 7 additions & 7 deletions src/components/Tile/Tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ interface TileProps {
icon: React.ReactNode;
to: string;
name: string;
tooltip?: string;
}

export default function Tile({ icon, to, name }: TileProps) {
export default function Tile({ icon, to, name, tooltip }: TileProps) {
const ariaLabel = tooltip ? `${name}: ${tooltip}` : name;
return (
<>
<a href={to} className={styles.tile}>
{icon}
{name}
</a>
</>
<a href={to} className={styles.tile} title={tooltip} aria-label={ariaLabel}>
{icon}
{name}
</a>
);
}
3 changes: 2 additions & 1 deletion src/components/TileGrid/TileGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ interface TileGridProps {
icon: React.ReactNode;
to: string;
name: string;
tooltip?: string;
}[];
}

export default function TileGrid({ tiles }: TileGridProps) {
return (
<div className={styles.gridContainer}>
{tiles.map((tile, index) => (
<Tile key={index} icon={tile.icon} to={tile.to} name={tile.name} />
<Tile key={index} icon={tile.icon} to={tile.to} name={tile.name} tooltip={tile.tooltip} />
))}
</div>
);
Expand Down
Loading