Web: Files: Fixed shared link styles

This commit is contained in:
Nikita Gopienko 2024-04-08 18:49:25 +03:00
parent ea1842b939
commit a2d07aa098
6 changed files with 33 additions and 10 deletions

View File

@ -45,7 +45,7 @@ import { IconButton } from "@docspace/shared/components/icon-button";
import { Tooltip } from "@docspace/shared/components/tooltip";
import { isDesktop } from "@docspace/shared/utils";
import LinksToViewingIconUrl from "PUBLIC_DIR/images/links-to-viewing.react.svg?url";
import PlusReactSvgUrl from "PUBLIC_DIR/images/actions.button.plus.react.svg?url";
import PlusIcon from "PUBLIC_DIR/images/plus.react.svg?url";
import { Avatar } from "@docspace/shared/components/avatar";
import { copyShareLink } from "@docspace/shared/utils/copy";
@ -216,10 +216,12 @@ const Members = ({
className="additional-link"
onClick={onAddNewLink}
>
<Avatar size="min" source={PlusReactSvgUrl} />
<div className="create-link-icon">
<IconButton size={12} iconName={PlusIcon} isDisabled />
</div>
<Link
isHovered
noHover
type="action"
fontSize="14px"
fontWeight={600}

View File

@ -73,12 +73,27 @@ const StyledLinkRow = styled.div`
gap: 12px;
height: 100%;
background: ${(props) => props.theme.backgroundColor};
cursor: pointer;
.icon-button_svg {
cursor: pointer;
}
.create-link-icon {
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
padding: 10px;
background: ${(props) => props.theme.avatar.icon.background};
}
.external-row-link {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
color: ${({ theme }) => theme.infoPanel.members.createLink};
}
.external-row-icons {

View File

@ -101,6 +101,11 @@ const StyledLinkRow = styled.div`
height: 32px;
width: 32px;
}
.create-and-copy_link {
width: 100%;
color: ${({ theme }) => theme.infoPanel.members.createLink};
}
`;
const StyledSquare = styled.div`
@ -110,6 +115,10 @@ const StyledSquare = styled.div`
border-radius: 3px;
padding: 10px;
background: ${(props) => props.theme.avatar.icon.background};
cursor: pointer;
.icon-button_svg {
cursor: pointer;
}
`;
export { StyledLinks, StyledLinkRow, StyledSquare };

View File

@ -67,16 +67,11 @@ const LinkRow = ({
};
return !links?.length ? (
<StyledLinkRow>
<StyledLinkRow onClick={onAddClick}>
<StyledSquare>
<IconButton size={12} iconName={PlusIcon} isDisabled />
</StyledSquare>
<Link
type={LinkType.action}
isHovered
fontWeight={600}
onClick={onAddClick}
>
<Link className="create-and-copy_link" noHover fontWeight={600}>
{t("Common:CreateAndCopy")}
</Link>
</StyledLinkRow>

View File

@ -2113,6 +2113,7 @@ export const getBaseTheme = () => {
roleSelectorColor: "#a3a9ae",
disabledRoleSelectorColor: "#a3a9ae",
roleSelectorArrowColor: "#a3a9ae",
createLink: "#a3a9ae",
},
history: {

View File

@ -2084,6 +2084,7 @@ const Dark: TTheme = {
roleSelectorColor: "#a3a9ae",
disabledRoleSelectorColor: "#a3a9ae",
roleSelectorArrowColor: "#a3a9ae",
createLink: "#858585",
},
history: {