Skip to content

Commit

Permalink
Adds tooltip to edit button
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbs committed Jul 24, 2024
1 parent 3143356 commit e6957ed
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/features/projects/view/toolbar/TrailingToolbarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SxProps } from "@mui/system"
import { Stack, IconButton, Typography, Link } from "@mui/material"
import { Stack, IconButton, Typography, Link, Tooltip } from "@mui/material"
import { Project, Version, OpenApiSpecification } from "../../domain"
import VersionSelector from "./VersionSelector"
import SpecificationSelector from "./SpecificationSelector"
Expand Down Expand Up @@ -66,14 +66,16 @@ const TrailingToolbarItem = ({
sx={{ marginRight: 0.5 }}
/>
{specification.editURL &&
<IconButton
href={specification.editURL}
target="_blank"
color="primary"
edge="end"
>
<FontAwesomeIcon icon={faPen} size="xs" style={{ aspectRatio: 1, padding: 2 }} />
</IconButton>
<Tooltip title={`Edit ${specification.name}`}>
<IconButton
href={specification.editURL}
target="_blank"
color="primary"
edge="end"
>
<FontAwesomeIcon icon={faPen} size="xs" style={{ aspectRatio: 1, padding: 2 }} />
</IconButton>
</Tooltip>
}
</Stack>
</>
Expand Down

0 comments on commit e6957ed

Please sign in to comment.