Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"src/**/*.{js,ts,tsx,scss}": [
"yarn run lint-fix"
"yarn run lint-fix --"
]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion packages/fuselage/src/components/Tag/Tag.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, Canvas, ArgsTable, Story } from '@storybook/addon-docs/blocks';

import { Tag, Box } from '../..';
import { Tag, Box, Icon } from '../..';

<Meta title='Data Display/Tag' parameters={{ jest: ['Tag/spec'] }} />

Expand All @@ -24,6 +24,22 @@ Used for mentions.
</Story>
</Canvas>

### Secondary

<Canvas>
<Story name='Secondary'>
<Box display='inline-flex'><Tag variant='secondary'>john.doe</Tag></Box>
</Story>
</Canvas>

### With icon

<Canvas>
<Story name='With Icon'>
<Box display='inline-flex'><Tag variant='secondary'><Icon size='x12' mie='x4' name='team-lock'/>john.doe</Tag></Box>
</Story>
</Canvas>

### Primary

<Canvas>
Expand Down
3 changes: 2 additions & 1 deletion packages/fuselage/src/components/Tag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function Tag({
className,
disabled,
onClick,
variant = 'secondary',
variant = 'default',
...props
}) {
const modifiers = [
Expand Down Expand Up @@ -43,5 +43,6 @@ Tag.propTypes = {
'danger',
'warning',
'ghost',
'default',
]),
};
14 changes: 14 additions & 0 deletions packages/fuselage/src/components/Tag/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
@use '../../styles/lengths.scss';
@use '../../styles/typography.scss';

$tag-colors-default-color: theme(
'tag-colors-default-color',
colors.foreground(default)
);
$tag-colors-default-background-color: theme(
'tag-colors-default-background-color',
colors.neutral(400)
);

$tag-colors-secondary-color: theme(
'tag-colors-secondary-color',
colors.foreground(primary)
Expand Down Expand Up @@ -76,6 +85,11 @@ $tag-colors-disabled-background-color: theme(

@include typography.use-font-scale(micro);

&--default {
color: $tag-colors-default-color;
background-color: $tag-colors-default-background-color;
}

&--secondary {
color: $tag-colors-secondary-color;
background-color: $tag-colors-secondary-background-color;
Expand Down