grafana / tutorials

A series of tutorials for helping you make the most out of Grafana.
Apache License 2.0
111 stars 29 forks source link

Build a panel plugin tutorial #210

Open growgreat77 opened 1 year ago

growgreat77 commented 1 year ago

https://grafana.com/tutorials/build-a-panel-plugin/ I got a problem following, It seems that it doesn't work with const theme = useTheme2(): ''let color: string; switch (options.color) { case 'red': color = theme.palette.redBase; break; case 'green': color = theme.palette.greenBase; break; case 'blue': color = theme.palette.blue95; break; }''

So I am using the following code for replacement and It goes OK. But I am not sure it is right. '' let color: string; switch (options.color) { case 'red': color = "red"; break; case 'green': color = "green"; break; case 'blue': color = "blue"; break; }''