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

Add Popover menu component #944

Merged
merged 22 commits into from
Jun 18, 2021
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
5 changes: 5 additions & 0 deletions .changeset/tame-mayflies-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': major
---

Replaced the old Popover component with a new one. It uses Popper v2 and comes with a refreshed component API.
23 changes: 23 additions & 0 deletions packages/circuit-ui/components/Popover/Popover.docs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Status, Props, Story } from '../../../../.storybook/components';
import { Popover } from '@sumup/circuit-ui';

# Popover

Popover menus are a common pattern to display a list of subsequent action options, when interacting with an actionable component.

<Story id="popover-base" />
<Props of={Popover} />

- Triggers of Popover can be primary, secondary, tertiary buttons, an overflow icon, or components with embedded buttons such as the [ImageInput component](Forms/ImageInput).
- Each Popover action item is represented by an appropriate HTML element (button or a).
- If needed the dividing line can be used to separate Popover action items.
- The leading icon is optional.
- The Popover is powered by React Popper [https://popper.js.org/docs/v2/] which means you can easily change the Popover placement by simply passing the placement prop.

## Usage guidelines

- **Do** use clear, concise and actionable labels for Popover items
- **Do** always think about the priority of the action option to be taken and put the option order in logical order

<Story id="popover-icon-trigger" />
<Story id="popover-item-base" />
263 changes: 0 additions & 263 deletions packages/circuit-ui/components/Popover/Popover.js

This file was deleted.

Loading