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

Popover with arrow (tooltip view) #2446

Merged
merged 2 commits into from
Oct 23, 2023
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
7 changes: 7 additions & 0 deletions next-docs/pages/components/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Layout from '../../components/Layout';
import PropsTable from '../../components/PropsTable';
import Default from '../../public/examples/popover/Default';
import Position from '../../public/examples/popover/Position';
import TooltipView from '../../public/examples/popover/TooltipView';
import TriggerElements from '../../public/examples/popover/TriggerElements';
import WithClose from '../../public/examples/popover/WithClose';
import useComponent from '../../utils/useComponent';
Expand Down Expand Up @@ -66,6 +67,12 @@ const PagePopover = () => {
code={examples ? examples.WithClose : 'Loading'}
/>

<Preview
title="Tooltip view example"
preview={<TooltipView />}
code={examples ? examples.TooltipView : 'Loading'}
/>

<PropsTable
title="Popover"
data={[
Expand Down
18 changes: 18 additions & 0 deletions next-docs/public/examples/popover/TooltipView.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import { Popover, Chip } from '@heathmont/moon-core-tw';

const Example = () => {
return (
<Popover position="top">
<Popover.Trigger>
<Chip>Trigger</Chip>
</Popover.Trigger>
<Popover.Panel className="w-auto min-w-[12rem] overflow-y-visible p-3 rounded-moon-s-xs text-moon-12 text-bulma bg-goku">
This is the popover with arrow (tooltip)
<Popover.Arrow />
</Popover.Panel>
</Popover>
);
};

export default Example;
Loading
Loading