Skip to content

[2.x] Allow custom classes on the dropdown class#661

Merged
taylorotwell merged 6 commits intolaravel:2.xfrom
natecorkish:patch-1
Feb 5, 2021
Merged

[2.x] Allow custom classes on the dropdown class#661
taylorotwell merged 6 commits intolaravel:2.xfrom
natecorkish:patch-1

Conversation

@natecorkish
Copy link
Contributor

@natecorkish natecorkish commented Feb 4, 2021

To keep code duplication to a minimum, people re-use components from jet stream, for example the dropdown, currently the dropdown only has a pre-set alignment, a person may want to show the dropdown on the left-side on mobile phones, but to the right on a web browser. Currently they don't have an option for that. So; with this PR they could do the following:

<x-jet-dropdown align="other" width="60" dropdownClasses="left-0 md:right-0">
    // ....
</x-jet-dropdown>

Use case: a person may want to show the dropdown on the left on mobile, but to the right on the web. Currently they don't have an option for that. So they could do:

`left-0 md:right-0`
@ph7jack
Copy link

ph7jack commented Feb 5, 2021

that way, if not passed the dropdownClasses by parameter will give variable error

@driesvints driesvints changed the title Allow custom classes on the dropdown class [2.x] Allow custom classes on the dropdown class Feb 5, 2021
@taylorotwell taylorotwell merged commit 15e8b37 into laravel:2.x Feb 5, 2021
@natecorkish natecorkish deleted the patch-1 branch February 6, 2021 12:11
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