Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #99773
    admin
    Keymaster

    Do you have an example how to use themes in a complete application?
    How to declare and import themes?
    Currently I have only one CSS file and I decided to include it in the html file instead of importing it as it is quite heavy.
    <link rel="stylesheet" type="text/css" href="/js/source/styles/smart.default.css" />
    I noticed that most if not all elements have theme property and you can get and set it but that is all I could found about themes.
    The big picture is missing from me and I could not find anything on your documentation or examples.
    For example Button API: https://www.htmlelements.com/docs/button-api/

    Set the theme property by using the HTML Element's instance.
     const button = document.querySelector('smart-button');
     button.theme = 'red';
    #99775
    admin
    Keymaster

    Hi petays,
    There are two themes defined in the smart.default.css – Light(default) and Dark which is set with theme=’dark’.
    <smart-button theme="dark" id="myButton">Click</smart-button>
    Example: https://codepen.io/anon/pen/joNNBE?&editable=true
    Best Wishes,
    Smart HTML Elements Team
    https://www.htmlelements.com

    #103194
    Joseph Norris
    Blocked

    What does it take to get the theme attribute working on the DropDownList?

    I tried

    import 'smart-webcomponents-react/source/styles/smart.red.css'
    
    <DropDownList theme="red"></DropDownList>
    

    but it is always blue.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.