Code Monkey home page Code Monkey logo

Comments (4)

patrickarlt avatar patrickarlt commented on June 5, 2024 1

@macandcheese since dir and lang are actual HTML attributes should we just look them up from the DOM as I'm doing now?

from calcite-design-system.

macandcheese avatar macandcheese commented on June 5, 2024

Currently have this working for "theme" via a wrapping component and state tunnel. The global config props are all passed to and validated in the "calcite-config" component and tunneled through a ConfigInterface to a child component.

In the child component we just check if a "theme" prop is requested in DOM, and if not, fall back to the globally configured one. Works well for "theme" on alert and tabs, going to try and hook it up for "dir" and "lang" and can do a PR for feedback.

from calcite-design-system.

macandcheese avatar macandcheese commented on June 5, 2024

Yeah that's the plan, just look it up in the Config vs. in each component that needs access to it. I realize I made it sound like folks would need to specify on the Config as a prop, not the case.

from calcite-design-system.

macandcheese avatar macandcheese commented on June 5, 2024

I think this has been tabled for now, closing, can reference prior PR for ideas if we tackle this down the road.

from calcite-design-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.