Skip to content

Add a new prop setComponentWidth to resolve layout shrinkage issues#182

Open
dannya wants to merge 2 commits into
neptunian:masterfrom
wonderscore:fix/layout-shrinkage
Open

Add a new prop setComponentWidth to resolve layout shrinkage issues#182
dannya wants to merge 2 commits into
neptunian:masterfrom
wonderscore:fix/layout-shrinkage

Conversation

@dannya
Copy link
Copy Markdown

@dannya dannya commented Jun 30, 2020

  • 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 the Gallery 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.

Fixes: #140
Fixes: #157
Fixes: #166

dannya added 2 commits June 30, 2020 02:03
…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.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.8%) to 85.762% when pulling c7b3186 on wonderscore:fix/layout-shrinkage into 0bb8e4c on neptunian:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants