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

Set active and inactive class name globally #65

Open
nataliethistime opened this issue Jul 10, 2020 · 1 comment · May be fixed by #69
Open

Set active and inactive class name globally #65

nataliethistime opened this issue Jul 10, 2020 · 1 comment · May be fixed by #69

Comments

@nataliethistime
Copy link

I'm using Bulma in a project where the active class is is-active instead of just active. It would be nice to be able to set this globally rather than specifying class_active: 'is-active' on each invocation.

I'm out of time for today but I'll see if I can throw together a PR that does this.

@saiqulhaq
Copy link

saiqulhaq commented Oct 8, 2020

it's easy to do
just add configuration class like https://github.com/dry-rb/dry-configurable
then update all active_class to use default config
like this one

if [:active, :class_active, :class_inactive, :active_disable, :wrap_tag, :wrap_class].member?(k)

and this
options[:class_active] || 'active'

jpteti added a commit to jpteti/active_link_to that referenced this issue Feb 9, 2022
comfy#65

If you wanted to use a standard class name for active status (for example in a CSS framework),
this was previously not possible.

* Implement a standard `.configure` block
* Add tests
@jpteti jpteti linked a pull request Feb 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants