Skip to content

Commit

Permalink
Refactored pill component to allow entire pill to be clickable; updat…
Browse files Browse the repository at this point in the history
…ed pill.less to preserve styling (#466)

Co-authored-by: Bill Whorton <>
  • Loading branch information
wwhorton authored Oct 4, 2023
1 parent 358879f commit 6ab42fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/components/Search/Pill.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export const Pill = ({ fieldName, value }) => {
};

return (
<li className="pill flex-fixed">
<span className="name">
{prefix}
{trimmed}
</span>
<button onClick={remove}>
<li>
<button className="pill flex-fixed" onClick={remove}>
<span className="name">
{prefix}
{trimmed}
</span>
<span className="u-visually-hidden">
{`Remove ${trimmed} as a filter`}
</span>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Search/Pill.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
cursor: pointer;
}
// Close button
button {
button, .cf-icon-svg {
padding: 0;
padding-left: 5px;
border: 0;
margin: 0;
background-color: transparent;
color: @teal-80;
position: absolute;
right: 10px;
right: 15px;
top: 50%;
transform: translateY(-50%);
}
Expand Down

0 comments on commit 6ab42fe

Please sign in to comment.