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

The horizontal and vertical padding should be allowed to be set independently #22

Open
Tyler-Lopez opened this issue Jun 16, 2024 · 0 comments

Comments

@Tyler-Lopez
Copy link

Currently, only symmetrical margins may be applied. We should be able to set horizontal and vertical padding separately.

Tyler-Lopez added a commit to Tyler-Lopez/Tooltip that referenced this issue Jun 16, 2024
…dently

### Background

The margin from the coachmark to its anchor and the screen edge is currently set by a single integer value. This failed my use-case of a TOP or BOTTOM coachmark that should be a certain distance horizontally from the screen-edge, but very close to its anchoring view.

### Changes

This commit introduces two new `Builder` functions: `withPaddingHorizontal` and `withPaddingVertical`.

The private parameter `padding` has been split into `paddingHorizontal` and `paddingVertical` and these functions set the respective value.

The existing `Builder` function `withPadding` sets both `paddingHorizontal` and `paddingVertical` and is unchanged.
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

No branches or pull requests

1 participant