Skip to content

Commit

Permalink
Popover with arrow (tooltip view) (#2446)
Browse files Browse the repository at this point in the history
* add tooltip view example

* popover with arrow view
  • Loading branch information
yarema184 authored Oct 23, 2023
1 parent ed1b10b commit 538dcd2
Show file tree
Hide file tree
Showing 6 changed files with 508 additions and 43 deletions.
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

0 comments on commit 538dcd2

Please sign in to comment.