Skip to content

Add placement props to Popover component #709

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

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

HichamELBSI
Copy link
Collaborator

Signed-off-by: HichamELBSI [email protected]

What does it do?

Since the Popover is handled by floating-ui, we are now able to choose where the popover will be handled. This update will be helpful for the Strapi Cloud app

@HichamELBSI HichamELBSI added the pr: enhancement This PR adds or updates some part of the codebase or features label Sep 30, 2022
@HichamELBSI HichamELBSI added this to the 1.2.5 milestone Sep 30, 2022
@vercel
Copy link

vercel bot commented Sep 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
design-system ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 2:40PM (UTC)
design-system-website ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 2:40PM (UTC)

Copy link
Contributor

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reckon we can be tighter on PropTypes but otherwise looks good, glad this library addition has helped 🤙🏻

/**
* The popover position
*/
placement: PropTypes.string,
Copy link
Contributor

@joshuaellis joshuaellis Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this prop can be better defined, there are specific options available:

type Placement =
  | 'top'
  | 'top-start'
  | 'top-end'
  | 'right'
  | 'right-start'
  | 'right-end'
  | 'bottom'
  | 'bottom-start'
  | 'bottom-end'
  | 'left'
  | 'left-start'
  | 'left-end';

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you, I was looking for this 😄

@HichamELBSI HichamELBSI force-pushed the enh/add-popover-placement branch from ab940a0 to 04a3f73 Compare September 30, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: enhancement This PR adds or updates some part of the codebase or features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants