Missing Components in grafana/ui

Found some interesting components in the Storybook I like to play with, but when I try to import it its missing. e.g. InlineSwitch, InlineFieldRow, InlineLabel …

So whats the magic behind this?

How are you importing the components currently?

It should look something like this:

import { InlineFieldRow } from '@grafana/ui';

Wow. I did it exactly that way, and vscode told me its not in @grafana/ui. Then I checked the components and did’nt found anything. So I upgraded with yarn @grafana/ui. Now after your answer I startet vscode again and now its finding the components. Can it be that it was just added recently?

Thanx so far.

1 Like

The new form components were added in 7.3, so if you use them, keep in mind that your users will need to have Grafana >=7.3.0 to use your plugin.

1 Like

Yeah I keep that in mind. And I think even newer version. Found in den logs that InlineSwitch was added on January 11th. After trying out the InlineSwitch I got in error in the console. So I updated to grafana 7.4 and it worked. So I think there is alot going on in the UI atm.

Maybe would be an idea to show version number in den storyboard docs, in which version to us.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.