Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chip): add / modify chip component #181

Merged
merged 14 commits into from
Jul 25, 2019
2 changes: 1 addition & 1 deletion packages/core/src/components/chip/_chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ray-chip-height: $ray-spacing-xs * 2 + 1rem;
}
}

&:focus {
.#{$ray-accessibility-class} &:focus {
gmharrison marked this conversation as resolved.
Show resolved Hide resolved
box-shadow: $ray-box-shadow-focus-state;
}
}
Expand Down
47 changes: 41 additions & 6 deletions packages/core/stories/chip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ storiesOf('Chip', module).add('default', () => {
</>
);
});
storiesOf('Chip', module).add('default RTL', () => {
setTimeout(initChip);
return (
<div dir="rtl">
<div tabIndex="1" className="ray-chip">
Neighborhoods
</div>
<div tabIndex="1" className="ray-chip ray-chip--active">
Offices
</div>
</div>
);
});
storiesOf('Chip', module).add('micro', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can chain these .add statements

setTimeout(initChip);
return (
Expand Down Expand Up @@ -69,15 +82,37 @@ storiesOf('Chip', module).add('with icon', () => {
</div>
);
});
storiesOf('Chip', module).add('micro', () => {
storiesOf('Chip', module).add('RTL with icon', () => {
setTimeout(initChip);
return (
<div>
<div tabIndex="1" className="ray-chip ray-chip--micro">
Offices
<div dir="rtl">
<div tabIndex="1" className="ray-chip">
<div className="ray-chip__icon-wrapper">
<svg width="10" height="10" viewBox="0 0 10 10">
<rect
width="10"
height="10"
strokeWidth="2"
stroke="#0000FF"
fill="#FFFFFF"
/>
</svg>
<span className="ray-chip__text">Furnished</span>
</div>
</div>
<div tabIndex="1" className="ray-chip ray-chip--micro ray-chip--active">
Offices
<div tabIndex="1" className="ray-chip ray-chip--active">
<div className="ray-chip__icon-wrapper">
<svg width="10" height="10" viewBox="0 0 10 10">
<rect
width="10"
height="10"
strokeWidth="2"
stroke="#0000FF"
fill="#FFFFFF"
/>
</svg>
<span className="ray-chip__text">Offices</span>
</div>
</div>
</div>
);
Expand Down