Skip to content

Commit

Permalink
fix(tag): add link styles (#100)
Browse files Browse the repository at this point in the history
* fix(tag): add link styles

* chore(tag): add a story
  • Loading branch information
Celeste Glavin authored May 16, 2019
1 parent ff33608 commit 8c5cf4b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/components/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ title: Tag
variation="tag"
>
</component>

<component
component="tag"
variation="tag-link"
>
</component>
1 change: 1 addition & 0 deletions docs/html/tag/tag-link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="javascript:;" class="ray-tag">Enterprise</a>
13 changes: 12 additions & 1 deletion packages/core/src/components/tag/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@
@include exports('ray-tag') {
.#{$ray-class-prefix}tag {
font-family: $ray-font-stack-mono;
border: 1px solid $ray-color-black;
border: 1px solid $ray-color-gray-30;
border-radius: $ray-border-radius;
display: inline;
padding: $ray-spacing-3xs $ray-spacing-xs;
text-transform: uppercase;
font-weight: 400;
font-size: 0.875rem;
}

a.#{$ray-class-prefix}tag {
border-color: $ray-color-black;
color: $ray-color-black;

&:hover {
border-color: $ray-color-blue-50;
color: $ray-color-blue-50;
text-decoration: none;
}
}
}
18 changes: 13 additions & 5 deletions packages/core/stories/tag.stories.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import React from 'react';
import { storiesOf } from '@storybook/react';

storiesOf('Tag', module).add('default', () => (
<>
<span className="ray-tag">Enterprise</span>
</>
));
storiesOf('Tag', module)
.add('default', () => (
<>
<span className="ray-tag">Enterprise</span>
</>
))
.add('as a link', () => (
<>
<a href="javascript:;" className="ray-tag">
Enterprise
</a>
</>
));

0 comments on commit 8c5cf4b

Please sign in to comment.