-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(popover): adjust name component rich tooltip to popover (#708)
- Loading branch information
1 parent
079d3f0
commit 1460bd8
Showing
8 changed files
with
123 additions
and
130 deletions.
There are no files selected for viewing
File renamed without changes.
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 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
70 changes: 70 additions & 0 deletions
70
packages/core/src/components/popover/stories/popover.vue.stories.tsx
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,70 @@ | ||
import { AtomButton, AtomPopover } from '@juntossomosmais/atomium/vue' | ||
import { Meta, StoryObj } from '@storybook/vue3' | ||
|
||
import { PopoverComponentArgs, PopoverStoryArgs } from './popover.args' | ||
|
||
export default { | ||
title: 'Components/Popover', | ||
...PopoverStoryArgs, | ||
} as Meta | ||
|
||
const createPopover = (args, buttonText = 'Hover') => ({ | ||
components: { AtomButton, AtomPopover }, | ||
setup() { | ||
return { args, buttonText } | ||
}, | ||
template: ` | ||
<AtomButton | ||
fill="solid" | ||
size="large" | ||
:id="buttonText" | ||
aria-describedby="atom-popover" | ||
> | ||
{{ buttonText }} | ||
</AtomButton> | ||
<AtomPopover | ||
id="atom-popover" | ||
:placement="args.placement" | ||
:element="buttonText" | ||
:label="args.label" | ||
:action="args.action" | ||
:actionText="args.actionText" | ||
:open="args.open" | ||
> | ||
{{ args.text }} | ||
</AtomPopover> | ||
`, | ||
}) | ||
|
||
export const Hover: StoryObj = { | ||
render: (args) => createPopover(args, 'Hover'), | ||
args: { | ||
...PopoverComponentArgs, | ||
element: 'hover', | ||
placement: 'top', | ||
open: false, | ||
}, | ||
} | ||
|
||
export const Click: StoryObj = { | ||
render: (args) => createPopover(args, 'Click'), | ||
args: { | ||
...PopoverComponentArgs, | ||
element: 'click', | ||
placement: 'top', | ||
action: 'click', | ||
open: false, | ||
}, | ||
} | ||
|
||
export const Opened: StoryObj = { | ||
render: (args) => createPopover(args, 'Opened'), | ||
args: { | ||
...PopoverComponentArgs, | ||
element: 'opened', | ||
placement: 'left', | ||
action: 'click', | ||
open: true, | ||
}, | ||
} |
Oops, something went wrong.