grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

Add custom css to override dashboard setting? #678

Closed jeromeryu closed 5 months ago

jeromeryu commented 5 months ago

Hi team! Is there any way to add custom css to override existing css codes? I want to remove title space from my scenesapp so that it has more room. currently I managed to do something like this

export const HomePage = () => {
  const scene = useMemo(() => getScene(), []);
  const css = `
  .root > div > div >.scrollbar-view > div > div:first-child {
    display: none;
  }
  `;

  return (
    <div className="root">
      <style>{css}</style>
      <scene.Component model={scene} />;
    </div>
  );
};

but it looks weire and messy.. Is there any ways that I can achieve this?

Thanks

torkelo commented 5 months ago

not sure I understand, what title space? do you mean the page title?

you can change how that is rendered with renderTitle (property on SceneAppPage)

jeromeryu commented 5 months ago

I want to delete all the random spaces in page-header html component, I've tried renderTitle but it still leaves some margin.