Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use SVG for Tag delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain Souquet committed Apr 13, 2022
1 parent c95b212 commit 48c389a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions res/css/views/elements/_TagComposer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ limitations under the License.
background: $system;
position: relative;

&::before {
content: "";
font-size: 0.7em;
svg {
width: .5em;
vertical-align: middle;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/views/elements/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
import React from "react";

import AccessibleButton from "./AccessibleButton";
import { Icon as CancelRounded } from "../../../../res/img/element-icons/cancel-rounded.svg";

interface IProps {
icon?: () => JSX.Element;
Expand All @@ -35,7 +36,9 @@ export const Tag = ({
{ icon?.() }
{ label }
{ onDeleteClick && (
<AccessibleButton className="mx_Tag_delete" onClick={onDeleteClick} disabled={disabled} />
<AccessibleButton className="mx_Tag_delete" onClick={onDeleteClick} disabled={disabled}>
<CancelRounded />
</AccessibleButton>
) }
</div>;
};

0 comments on commit 48c389a

Please sign in to comment.