Skip to content

Commit

Permalink
feat: move new Popover from lab
Browse files Browse the repository at this point in the history
  • Loading branch information
amje committed Dec 28, 2024
1 parent 45ac6e1 commit 28966c1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
} from '@floating-ui/react';
import type {UseInteractionsReturn} from '@floating-ui/react';

import {useControlledState, useForkRef} from '../../../hooks';
import {Popup} from '../../Popup';
import type {PopupProps} from '../../Popup';
import type {AriaLabelingProps, DOMProps, QAProps} from '../../types';
import {block} from '../../utils/cn';
import {getElementRef} from '../../utils/getElementRef';
import {useControlledState, useForkRef} from '../../hooks';
import {Popup} from '../Popup';
import type {PopupProps} from '../Popup';
import type {AriaLabelingProps, DOMProps, QAProps} from '../types';
import {block} from '../utils/cn';
import {getElementRef} from '../utils/getElementRef';

export interface PopoverProps
extends AriaLabelingProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {Popover} from '@gravity-ui/uikit';
```

The `Popover` component is technically the [`Popup`](./TODO) with some trigger interactivity built-in. The `Popover` uses passed `ReactElement`
The `Popover` component is technically the [`Popup`](../Popup/README.md) with some trigger interactivity built-in. The `Popover` uses passed `ReactElement`
from `children` property as a trigger, and opens whenever trigger is hovered or clicked. Content of the `Popover` might contain
interactive elements like links or buttons.

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {action} from '@storybook/addon-actions';
import type {Meta, StoryObj} from '@storybook/react';

import {Button} from '../../../Button';
import {Link} from '../../../Link';
import {Flex} from '../../../layout';
import {Button} from '../../Button';
import {Link} from '../../Link';
import {Flex} from '../../layout';
import {Popover} from '../Popover';

const meta: Meta<typeof Popover> = {
title: 'Lab/Popover',
title: 'Components/Overlays/Popover',
component: Popover,
parameters: {
layout: 'centered',
Expand Down
1 change: 1 addition & 0 deletions src/components/Popover/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Popover';
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export * from './Palette';
export * from './UserLabel';
export * from './PinInput';
export * from './PlaceholderContainer';
export * from './Popover';
export * from './Popup';
export * from './Portal';
export * from './Progress';
Expand Down

0 comments on commit 28966c1

Please sign in to comment.