This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/uiuseStyles2

useStyles2() function

useStyles2() function

Signature

export declare function useStyles2<T>(getStyles: (theme: GrafanaTheme2) => T): T;

Import

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

Parameters

Parameter Type Description
getStyles (theme: GrafanaTheme2) => T

Returns:

T