-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
181 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { BasicTooltip } from '../tooltip/basic-tooltip'; | ||
import { Tag, type TagProps, type TagVariants } from './tag'; | ||
|
||
type TooltipSideType = 'bottom' | 'left' | 'right' | 'top'; | ||
|
||
interface TagWithTooltipProps extends TagProps { | ||
hoverLabel: string; | ||
side?: TooltipSideType; | ||
} | ||
export function TagWithTooltip({ | ||
hoverLabel, | ||
side = 'bottom', | ||
...props | ||
}: TagWithTooltipProps & TagVariants) { | ||
return ( | ||
<BasicTooltip label={hoverLabel} side={side}> | ||
<Tag {...props} /> | ||
</BasicTooltip> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ErrorCircleIcon } from '@app/ui/icons'; | ||
|
||
import { Tag as Component } from './tag'; | ||
|
||
const meta: Meta<typeof Component> = { | ||
component: Component, | ||
tags: ['autodocs'], | ||
title: 'Tag', | ||
parameters: { | ||
controls: { include: ['transparent', 'variant'] }, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Component>; | ||
|
||
export const Tag: Story = { | ||
args: { | ||
label: 'Label', | ||
variant: 'default', | ||
}, | ||
}; | ||
|
||
export const WithIcon: Story = { | ||
args: { | ||
icon: <ErrorCircleIcon variant="small" />, | ||
label: 'Label', | ||
variant: 'default', | ||
}, | ||
}; |
Oops, something went wrong.