-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE(web-twig): Remove
isFullWidth
and breakpoint
prop…
…s from `Dropdown` #DS-588 Also improved demo and docs. ## Migration Guide Use `fullWidthMode` prop instead of `isFullWidth` and `breakpoint` on `Dropdown` component. - `<Dropdown isFullWidth …>` → `<Dropdown fullWidthMode="all" …>` - `<Dropdown isFullWidth breakpoint="mobile" …>` → `<Dropdown fullWidthMode="mobile-only" …>` Please refer back to this guide or reach out to our team if you encounter any issues during migration.
- Loading branch information
Showing
15 changed files
with
177 additions
and
283 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
60 changes: 27 additions & 33 deletions
60
packages/web-twig/src/Resources/components/Dropdown/stories/DropdownDisabledAutoclose.twig
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
<section class="docs-Section"> | ||
|
||
<h2 class="docs-Heading">Usage with disabled auto close</h2> | ||
|
||
<DropdownWrapper> | ||
<Button | ||
data-toggle="dropdown" | ||
data-target="#DropdownDemo1-2" | ||
data-autoclose="true" | ||
> | ||
Button as anchor | ||
</Button> | ||
<Dropdown id="DropdownDemo1-2"> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="info" UNSAFE_className="mr-400" /> | ||
<span>Information</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="link" UNSAFE_className="mr-400" /> | ||
<span>Bibendum aliquam, fusce integer sit amet congue non nulla aliquet enim</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="profile" UNSAFE_className="mr-400" /> | ||
<span>Profile</span> | ||
</a> | ||
<a href="#" class="d-flex"> | ||
<Icon name="help" UNSAFE_className="mr-400" /> | ||
<span>Help</span> | ||
</a> | ||
</Dropdown> | ||
</DropdownWrapper> | ||
|
||
</section> | ||
<DropdownWrapper> | ||
<Button | ||
data-toggle="dropdown" | ||
data-target="#dropdownDisabledAutoClose" | ||
data-autoclose="true" | ||
> | ||
Button as anchor | ||
</Button> | ||
<Dropdown id="dropdownDisabledAutoClose"> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="info" UNSAFE_className="mr-400" /> | ||
<span>Information</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="link" UNSAFE_className="mr-400" /> | ||
<span>Bibendum aliquam, fusce integer sit amet congue non nulla aliquet enim</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="profile" UNSAFE_className="mr-400" /> | ||
<span>Profile</span> | ||
</a> | ||
<a href="#" class="d-flex"> | ||
<Icon name="help" UNSAFE_className="mr-400" /> | ||
<span>Help</span> | ||
</a> | ||
</Dropdown> | ||
</DropdownWrapper> |
32 changes: 0 additions & 32 deletions
32
packages/web-twig/src/Resources/components/Dropdown/stories/DropdownFullwidth.twig
This file was deleted.
Oops, something went wrong.
58 changes: 26 additions & 32 deletions
58
packages/web-twig/src/Resources/components/Dropdown/stories/DropdownFullwidthAll.twig
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
<section class="docs-Section"> | ||
|
||
<h2 class="docs-Heading">Full-width mode 'all'</h2> | ||
|
||
<DropdownWrapper> | ||
<Button | ||
data-toggle="dropdown" | ||
data-target="#DropdownDemo2-1" | ||
> | ||
Finibus quis imperdiet, semper imperdiet aliquam | ||
</Button> | ||
<Dropdown id="DropdownDemo2-1" fullWidthMode="all"> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="info" UNSAFE_className="mr-400" /> | ||
<span>Information</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="link" UNSAFE_className="mr-400" /> | ||
<span>Bibendum aliquam, fusce integer sit amet congue non nulla aliquet enim</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="profile" UNSAFE_className="mr-400" /> | ||
<span>Profile</span> | ||
</a> | ||
<a href="#" class="d-flex"> | ||
<Icon name="help" UNSAFE_className="mr-400" /> | ||
<span>Help</span> | ||
</a> | ||
</Dropdown> | ||
</DropdownWrapper> | ||
|
||
</section> | ||
<DropdownWrapper> | ||
<Button | ||
data-toggle="dropdown" | ||
data-target="#dropdownFullWidthModeAll" | ||
> | ||
Finibus quis imperdiet, semper imperdiet aliquam | ||
</Button> | ||
<Dropdown id="dropdownFullWidthModeAll" fullWidthMode="all"> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="info" UNSAFE_className="mr-400" /> | ||
<span>Information</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="link" UNSAFE_className="mr-400" /> | ||
<span>Bibendum aliquam, fusce integer sit amet congue non nulla aliquet enim</span> | ||
</a> | ||
<a href="#" class="d-flex mb-400"> | ||
<Icon name="profile" UNSAFE_className="mr-400" /> | ||
<span>Profile</span> | ||
</a> | ||
<a href="#" class="d-flex"> | ||
<Icon name="help" UNSAFE_className="mr-400" /> | ||
<span>Help</span> | ||
</a> | ||
</Dropdown> | ||
</DropdownWrapper> |
32 changes: 0 additions & 32 deletions
32
packages/web-twig/src/Resources/components/Dropdown/stories/DropdownFullwidthMobile.twig
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.