Add a new prop setComponentWidth to resolve layout shrinkage issues#182
Open
dannya wants to merge 2 commits into
Open
Add a new prop setComponentWidth to resolve layout shrinkage issues#182dannya wants to merge 2 commits into
setComponentWidth to resolve layout shrinkage issues#182dannya wants to merge 2 commits into
Conversation
…the Gallery container element. Fixes: neptunian#140 Fixes: neptunian#157 Fixes: neptunian#166
…ery` component for configuring the container element width.
Allowed types for this prop are `string` and `boolean` - this allows for the following customizations:
- `(no prop explicitly set)` or `setComponentWidth={true}`: set the container width to the component default (`100%`).
- `setComponentWidth='80%'` or `setComponentWidth='768px'` or any valid CSS width value: set the container width to the specified value.
- `setComponentWidth={false}`: do not set any width on the component container - this allows the consuming code to manage this itself.
* Update docs and tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set an explicit width (100%, as the demos suggest it should be) on the Gallery container element.
Add a new prop
setComponentWidth(default:'100%') to theGallerycomponent for configuring the container element width.Allowed types for this prop are
stringandboolean- this allows for the following customizations:(no prop explicitly set)orsetComponentWidth={true}: set the container width to the component default (100%).setComponentWidth='80%'orsetComponentWidth='768px'or any valid CSS width value: set the container width to the specified value.setComponentWidth={false}: do not set any width on the component container - this allows the consuming code to manage this itself.Fixes: #140
Fixes: #157
Fixes: #166