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

feat(Reactions): add addButtonPlacement property #215

Merged

Conversation

Ruminat
Copy link
Contributor

@Ruminat Ruminat commented Sep 2, 2024

Added a property (addButtonPosition) for placing the "Add reaction" button:

изображение

The default (right) stays the same

@Ruminat Ruminat requested a review from amje September 2, 2024 09:56
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

*
* @default 'right'
*/
addButtonPosition?: 'left' | 'right' | 'none';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's separate hiding and placement, also we use logical values (start/end) instead of physical ones (left/right)

Suggested change
addButtonPosition?: 'left' | 'right' | 'none';
addButtonPlacement?: 'start' | 'end';

none value is the same as readOnly, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • Turned left/right to start/end
  • Moved none to a separate property hideAddButton

none value is the same as readOnly, isn't it?

Not quite. You can still toggle reactions, it's just the button that hides

src/components/Reactions/__stories__/Reactions.stories.tsx Outdated Show resolved Hide resolved
@Ruminat
Copy link
Contributor Author

Ruminat commented Sep 3, 2024

@amje ping

@Ruminat Ruminat requested a review from amje September 4, 2024 08:52
@amje amje changed the title feat(Reactions): added addButtonPosition property feat(Reactions): add addButtonPlacement property Sep 5, 2024
@Ruminat Ruminat merged commit 6eccd44 into main Sep 5, 2024
4 checks passed
@Ruminat Ruminat deleted the feat-added-addButtonPosition-prop-to-Reactions-component branch September 5, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants