Skip to content

[PB-3520]:feat/Popover component update#93

Merged
jaaaaavier merged 2 commits intomasterfrom
feat/ui-popover-update
Apr 1, 2026
Merged

[PB-3520]:feat/Popover component update#93
jaaaaavier merged 2 commits intomasterfrom
feat/ui-popover-update

Conversation

@jaaaaavier
Copy link
Copy Markdown
Contributor

This PR introduces changes for the Popover component, we updated the behaviour of the align property, previously. it was aligning inversily. We also added the direction property that helps to display the popover up or down the component

@jaaaaavier jaaaaavier self-assigned this Mar 30, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label Mar 30, 2026
@jaaaaavier jaaaaavier requested a review from larryrider March 30, 2026 14:44
'absolute z-50 transform rounded-md border border-gray-10 ' +
`${direction === 'up' ? 'bottom-full mb-1' : 'mt-1'} ` +
`${align === 'left' ? 'right-0' : 'left-0'} ` +
`${direction === 'up' ? (align === 'left' ? 'origin-bottom-right' : 'origin-bottom-left') : (align === 'left' ? 'origin-top-right' : 'origin-top-left')} ` +
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hey, maybe we could add an object map so its more readable, wdyt?

im thinking in something like this:

const originMap = {
  up:   { left: 'origin-bottom-right', right: 'origin-bottom-left' },
  down: { left: 'origin-top-right',    right: 'origin-top-left'    },
};

// usage
`${originMap[direction][align]}`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

@jaaaaavier jaaaaavier requested a review from larryrider April 1, 2026 06:55
@jaaaaavier jaaaaavier merged commit d929190 into master Apr 1, 2026
1 check passed
@jaaaaavier jaaaaavier deleted the feat/ui-popover-update branch April 1, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants