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

Add Attr.DynamicClassPred #157

Closed
granicz opened this issue Feb 26, 2018 · 1 comment
Closed

Add Attr.DynamicClassPred #157

granicz opened this issue Feb 26, 2018 · 1 comment
Assignees
Labels

Comments

@granicz
Copy link
Member

granicz commented Feb 26, 2018

We currently have Attr.DynamicClass to set a CSS class when a view satisfies a given predicate. This could benefit from an Attr.DynamicClassPred variant that takes a View<bool> instead of the View<'T> and the 'T -> bool predicate.

@Tarmil
Copy link
Member

Tarmil commented Feb 26, 2018

Here's the full list of changes I intend to do:

  • Add the following:

    val DynamicClassPred : name: string -> isSet: View<bool> -> Attr
    
    // V-enabled on `isSet`, which makes it compile into DynamicClassPred
    val ClassPred : name: string -> isSet: bool -> Attr
  • Mark the current DynamicClass as obsolete, pointing to ClassPred and DynamicClassPred as replacements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants