Client:OAuth: remove tag icon

This commit is contained in:
Timofey Boyko 2023-12-22 12:32:31 +03:00
parent d5fd4a7868
commit e9602c6c43
5 changed files with 30 additions and 14 deletions

View File

@ -111,6 +111,7 @@ const Row = (props: RowProps) => {
>
<Tags
tags={item.scopes}
removeTagIcon
columnCount={tagCount}
onSelectTag={() => {}}
/>

View File

@ -29,6 +29,7 @@ const Tag = ({
className,
style,
icon,
removeTagIcon,
}) => {
const [openDropdown, setOpenDropdown] = React.useState(false);
@ -116,15 +117,18 @@ const Tag = ({
onClick={onClickAction}
data-tag={tag}
>
<StyledDropdownIcon
className="tag__dropdown-item-icon"
src={TagIconReactSvgUrl}
/>
{!removeTagIcon && (
<StyledDropdownIcon
className="tag__dropdown-item-icon"
src={TagIconReactSvgUrl}
/>
)}
<StyledDropdownText
className="tag__dropdown-item-text"
fontWeight={600}
fontSize={"12px"}
truncate
removeTagIcon={removeTagIcon}
>
{tag}
</StyledDropdownText>

View File

@ -98,15 +98,17 @@ const StyledDropdownIcon = styled(ReactSVG)`
const StyledDropdownText = styled(Text)`
line-height: 30px;
${(props) =>
props.theme.interfaceDirection === "rtl"
? css`
margin-right: 8px !important;
`
: css`
margin-left: 8px !important;
`}
!props.removeTagIcon &&
css`
${props.theme.interfaceDirection === "rtl"
? css`
margin-right: 8px !important;
`
: css`
margin-left: 8px !important;
`}
`}
display: block;

View File

@ -4,7 +4,15 @@ import Tag from "../tag";
import StyledTags from "./StyledTags";
const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => {
const Tags = ({
id,
className,
style,
tags,
columnCount,
onSelectTag,
removeTagIcon,
}) => {
const [renderedTags, setRenderedTags] = React.useState(null);
const tagsRef = React.useRef(null);
@ -113,6 +121,7 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => {
isNewTag={false}
onClick={onSelectTag}
isLast={index === renderedTags.length - 1}
removeTagIcon={removeTagIcon}
{...tag}
/>
))}

View File

@ -1,5 +1,5 @@
{
"date": "20231221_132646",
"date": "20231222_121923",
"checksums": {
"api.js": "27c5244c5921b801b763349ae4c711f5",
"api.poly.js": "586ce6831fa68f6bc33486e2cebc856e",