Skip to content

Commit

Permalink
Merge pull request #4028 from Sage/FE-4076-tile-select-title-adornmen…
Browse files Browse the repository at this point in the history
…t-pill-styling-with-word-wrap

fix(pill): fix text wrap if there are multiple words - FE-4076
  • Loading branch information
Michał Maciorowski authored May 18, 2021
2 parents 37d6ad0 + 55680f1 commit e120c1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/pill/pill.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ describe("Pill", () => {
return renderer(<Pill {...props}>My Text</Pill>);
};

it("has required styles", () => {
const wrapper = render();

assertStyleMatch(
{
whiteSpace: "nowrap",
},
wrapper
);
});

describe("when the children prop is passed to the component", () => {
let instance, pill;
beforeEach(() => {
Expand Down
1 change: 1 addition & 0 deletions src/components/pill/pill.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const PillStyle = styled.span`
justify-content: center;
border: 2px solid ${pillColor};
height: auto;
white-space: nowrap;
${inFill &&
css`
Expand Down

0 comments on commit e120c1f

Please sign in to comment.