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

Allow show/hiding options on condition #4

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

jeffreyvr
Copy link
Owner

Allows you to show an option if a condition is met.

Select::make(__('Image alignment'), 'image_alignment', [
    'left' => __('Left'),
    'right' => __('Right'),
    'center' => __('Center'),
])->condition('image'),

How it works: simply passes the string you fill in onto a wrapper div with the x-show attribute.

@jeffreyvr jeffreyvr marked this pull request as ready for review November 1, 2024 15:12
@jeffreyvr jeffreyvr merged commit e980d06 into main Nov 1, 2024
2 checks passed
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.

1 participant