Skip to content

Commit

Permalink
Web: Files: Tiles: Fixed badge padding
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kulak committed Jan 20, 2022
1 parent 9d09963 commit 61d8d33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions products/ASC.Files/Client/src/components/Badges.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Badges = ({
const showEditBadge = !locked || item.access === 0;
const isPrivacy = isPrivacyFolder && isDesktopClient;
const isForm = fileExst === ".oform";
const isTile = viewAs === "tile";

const iconEdit = isForm
? "/static/images/access.edit.form.react.svg"
Expand All @@ -49,16 +50,15 @@ const Badges = ({
const contentNewItems = newItems > 999 ? "999+" : newItems;

const tabletViewBadge =
viewAs !== "tile" &&
((sectionWidth > 500 && sectionWidth <= 1024) || isTablet);
!isTile && ((sectionWidth > 500 && sectionWidth <= 1024) || isTablet);

const sizeBadge = viewAs === "tile" || tabletViewBadge ? "medium" : "small";
const sizeBadge = isTile || tabletViewBadge ? "medium" : "small";

const lineHeightBadge = tabletViewBadge ? "1.46" : "1.34";
const lineHeightBadge = isTile || tabletViewBadge ? "1.46" : "1.34";

const paddingBadge = tabletViewBadge ? "0 5px" : "0 3px";
const paddingBadge = isTile || tabletViewBadge ? "0 5px" : "0 3px";

const fontSizeBadge = tabletViewBadge ? "11px" : "9px";
const fontSizeBadge = isTile || tabletViewBadge ? "11px" : "9px";

return fileExst ? (
<div className="badges additional-badges">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@ const StyledIcons = styled.div`
left: "-9px",
width: "calc(100% + 18px)",
})}
p {
font-size: 11px;
line-height: 16px;
}
}
`;

Expand Down

0 comments on commit 61d8d33

Please sign in to comment.