mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Avoid explicit React.FC<Props> when possible (#64722)
This commit is contained in:
@@ -13,12 +13,12 @@ To access the theme in your styles, use the `useStyles` hook. It provides basic
|
||||
> Please remember to put `getStyles` function at the end of the file!
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import React from 'react';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const Foo = (props: FooProps) => {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
// Use styles with classNames
|
||||
|
||||
Reference in New Issue
Block a user