Skip to content

Improve theme-switch examples #77

@nuzzles

Description

@nuzzles

I think stylist is honestly brilliant. Kudos. There isn't exactly an abundance of resources for Yew styling right now, so I'm just happy to see a great library in the space.

One of the more involved features of stylist is themeing.

I was able to largely get the theme-switch examples working in my project with only some minor headaches. But I'd really love to see it be documented better and simplified.

I'm wondering if PRs would be accepted - because I'd be happy to contribute.

As of now, some ideas I would contribute to a PR:

  • Documenting the examples. There are no comments/docs anywhere, leaving users to 'reverse engineer'.
  • Explain why one might use the context example over the hook for themeing on the examples' respective README's (One thing I was scratching my head at first).

And here's what I'd possibly simplify:

  • Remove the use of one_cell::sync::Lazy and yew::html::ImplicitClone. They are optimizations made and deserve to be either 1) documented or 2) removed as needless to the point of an example.
    I'd rather see 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions