Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
innovatixhub authored Nov 26, 2024
1 parent 8e3fc77 commit 766040f
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/componants/shared/mytools/whatdoidobutton/HideButtonIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
import { updateStorageState } from "src/Features/storageSlice";
import { hideWhatDoIDoButtonToolTipPos } from "src/Functions/componentsFunctions";
import SvgIcon from "../../../../MiniComponents/SvgIcon";
import ToolTip from "../../../../MiniComponents/ToolTip";
import s from "./HideButtonIcon.module.scss";

const HideButtonIcon = () => {
const { t, i18n } = useTranslation();
const dispatch = useDispatch();
const hideButtonToolTipPos = hideWhatDoIDoButtonToolTipPos(i18n.language);

function neverShowMenu() {
dispatch(updateStorageState({ key: "showWhatDoIDoIcon", value: false }));
}

return (
<div
className={s.hideIcon}
data-is-tooltip="true"
onClick={neverShowMenu}
aria-haspopup="true"
>
<SvgIcon name="xMark" />
<ToolTip
top={"-17px"}
left={hideButtonToolTipPos}
content={t("tooltips.hidePermanent")}
/>
</div>
);
};
export default HideButtonIcon;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@import "src/Styles/mixins";


.hideIcon {
-webkit-tap-highlight-color: transparent;
border: none;
outline: none;
background-color: var(--tomato);
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: -6px;
top: -6px;
cursor: pointer;
opacity: 0;
transition: opacity .2s, left .2s, top .2s;

&:focus-visible [data-is-tooltip=true] {
opacity: 1;
}
}

.hideIcon>svg {
width: 12px;
height: 12px;
fill: var(--white)
}

// Arabic styles
[lang=ar] .hideIcon {
right: 28px;
}

0 comments on commit 766040f

Please sign in to comment.