Skip to content

Commit

Permalink
tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxn committed Oct 22, 2023
1 parent 58e4b08 commit 7010294
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/components/Actions/BaseElements.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import WarningRoundedIcon from "@mui/icons-material/WarningRounded";

import useLemmyReports from "../../hooks/useLemmyReports";

import { BasicInfoTooltip } from "../Tooltip.jsx";

export const BaseActionButton = ({
// icon = null,
size = "small",
Expand All @@ -30,7 +32,7 @@ export const BaseActionButton = ({
// const { isFetching } = useLemmyReports();

return (
<Tooltip title={tooltip} color={color} variant="plain" placement="top" arrow disableInteractive>
<BasicInfoTooltip title={tooltip} color={color} variant="plain" placement="top" arrow disableInteractive>
<Button
variant={variant}
color={color}
Expand All @@ -47,7 +49,7 @@ export const BaseActionButton = ({
>
{text}
</Button>
</Tooltip>
</BasicInfoTooltip>
);
};

Expand Down
11 changes: 2 additions & 9 deletions src/components/Display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,7 @@ export const UpvoteDownvoteChip = ({ counts, ...props }) => {

export const FediverseChipLink = ({ href, size = "md", ...props }) => {
return (
<Tooltip
title="Open on remote instance"
color="neutral"
variant="outlined"
placement="top"
disableInteractive
arrow
>
<BasicInfoTooltip title="Open on remote instance" color="neutral" variant="outlined" placement="top">
<Chip
component={Link}
href={href}
Expand All @@ -140,6 +133,6 @@ export const FediverseChipLink = ({ href, size = "md", ...props }) => {
}}
{...props}
/>
</Tooltip>
</BasicInfoTooltip>
);
};
6 changes: 4 additions & 2 deletions src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { LemmyHttp } from "lemmy-js-client";

import { addUser, setAccountIsLoading, setUsers, setCurrentUser } from "../reducers/accountReducer";

import { BasicInfoTooltip } from "../components/Tooltip.jsx";

export default function LoginForm() {
const dispatch = useDispatch();

Expand Down Expand Up @@ -190,14 +192,14 @@ export default function LoginForm() {
py: 1,
}}
>
<Tooltip title="Will this session will be saved in your browser?" placement="bottom">
<BasicInfoTooltip title="Will this session will be saved in your browser?" placement="bottom">
<Checkbox
label="Save Session"
variant="outlined"
checked={saveSession}
onChange={() => setSaveSession(!saveSession)}
/>
</Tooltip>
</BasicInfoTooltip>
</Box>
</Box>

Expand Down

0 comments on commit 7010294

Please sign in to comment.