From 3a9dc6b1c8f72becc9286a8cda015a975f91b54b Mon Sep 17 00:00:00 2001 From: Alexey Kostenko Date: Wed, 25 Nov 2020 17:03:48 +0300 Subject: [PATCH] Web: Files: SharingPanel: Refactoring, Added toggle button and dropDown to LinkRow --- .../panels/SharingPanel/SharingRow.js | 8 +-- .../components/panels/SharingPanel/linkRow.js | 60 +++++++++++-------- .../src/components/panels/StyledPanels.js | 8 +++ 3 files changed, 46 insertions(+), 30 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/SharingPanel/SharingRow.js b/products/ASC.Files/Client/src/components/panels/SharingPanel/SharingRow.js index a064d66827..6b9272d75d 100644 --- a/products/ASC.Files/Client/src/components/panels/SharingPanel/SharingRow.js +++ b/products/ASC.Files/Client/src/components/panels/SharingPanel/SharingRow.js @@ -230,14 +230,14 @@ const SharingRow = (props) => { )} diff --git a/products/ASC.Files/Client/src/components/panels/SharingPanel/linkRow.js b/products/ASC.Files/Client/src/components/panels/SharingPanel/linkRow.js index 014940e6a6..d5649985d5 100644 --- a/products/ASC.Files/Client/src/components/panels/SharingPanel/linkRow.js +++ b/products/ASC.Files/Client/src/components/panels/SharingPanel/linkRow.js @@ -1,5 +1,6 @@ import React from "react"; -import { Row, LinkWithDropdown, Icons } from "asc-web-components"; +import { Row, LinkWithDropdown, ToggleButton } from "asc-web-components"; +import { StyledLinkRow } from "../StyledPanels"; class LinkRow extends React.Component { constructor(props) { @@ -9,33 +10,40 @@ class LinkRow extends React.Component { } render() { - const { linkText, data, index, t } = this.props; + const { + linkText, + data, + index, + t, + embeddedComponentRender, + accessOptions, + item, + } = this.props; return ( - - } - contextButtonSpacerWidth="0px" - > - <> - - {t(linkText)} - - - + + + <> + + {t(linkText)} + +
+ +
+ +
+
); } } diff --git a/products/ASC.Files/Client/src/components/panels/StyledPanels.js b/products/ASC.Files/Client/src/components/panels/StyledPanels.js index 22b8f9c678..1e512215e3 100644 --- a/products/ASC.Files/Client/src/components/panels/StyledPanels.js +++ b/products/ASC.Files/Client/src/components/panels/StyledPanels.js @@ -358,6 +358,13 @@ const StyledFooter = styled.div` } `; +const StyledLinkRow = styled.div` + .row_content { + display: grid; + grid-template-columns: 1fr 28px; + } +`; + export { StyledAsidePanel, StyledAddGroupsPanel, @@ -369,4 +376,5 @@ export { StyledSharingHeaderContent, StyledSharingBody, StyledFooter, + StyledLinkRow, };