Authress-Engineering / openapi-explorer

OpenAPI Web component to generate a UI from the spec.
Apache License 2.0
292 stars 42 forks source link

How to style m-btn component #227

Closed wparad closed 4 months ago

wparad commented 4 months ago

@neongrau

const docElement = document.querySelector('openapi-explorer');
      const style = document.createElement('style');
      style.innerHTML = `
      .m-btn {
        border-radius: 15px !important;
        box-shadow: none;
      }`;
      docElement.shadowRoot.appendChild(style);
    openapi-explorer::part(navbar-operations-header) { /*works*/
      background: linear-gradient(90deg, #0065AD, #02AFC3);
      border-top: none;
      border-bottom: 1px solid rgba(255,255,255, .2);
      font-size: 11px;
    }
    openapi-explorer::part(navbar-components-header) { /* needed but not implemented? */
      background: linear-gradient(90deg, #0065AD, #02AFC3);
      border-top: none;
      border-bottom: 1px solid rgba(255,255,255, .2);
      font-size: 11px;
    }
wparad commented 4 months ago

@neongrau can you provide a visual of what the problem is here and how you would like it to look like? This would be the best way to figure out how to either suggest a solution or provide new functionality. Thanks!

neongrau commented 4 months ago

currently button look like this: Bildschirmfoto 2024-02-06 um 14 27 17

but i want to restyle them to look like this: Bildschirmfoto 2024-02-06 um 14 30 31

neongrau commented 4 months ago

Closed?

wparad commented 4 months ago

Okay, now everything is fixed. You would reference the button style changes the same way you might do the other updates. In this case:

openapi-explorer::part(btn--resp) {
      border-radius: 15px !important;
      box-shadow: none;
    }

Is probably what you want.

neongrau commented 4 months ago

Okay, now everything is fixed. You would reference the button style changes the same way you might do the other updates. In this case:

openapi-explorer::part(btn--resp) {
      border-radius: 15px !important;
      box-shadow: none;
    }

Is probably what you want.

yes, that is perfect! Thank you very much for this great help!