mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Chore: replace React.FC<Props> with simple function component (#54123)
This commit is contained in:
@@ -10,7 +10,7 @@ type Props = {
|
||||
style?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export const CloseButton: React.FC<Props> = ({ onClick, 'aria-label': ariaLabel, style }) => {
|
||||
export const CloseButton = ({ onClick, 'aria-label': ariaLabel, style }: Props) => {
|
||||
const styles = useStyles2(getStyles);
|
||||
return (
|
||||
<IconButton aria-label={ariaLabel ?? 'Close'} className={styles} name="times" onClick={onClick} style={style} />
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Props extends StandardEditorProps<string, StringFieldConfigSettings> {
|
||||
suffix?: ReactNode;
|
||||
}
|
||||
|
||||
export const StringValueEditor: React.FC<Props> = ({ value, onChange, item, suffix }) => {
|
||||
export const StringValueEditor = ({ value, onChange, item, suffix }: Props) => {
|
||||
const Component = item.settings?.useTextarea ? TextArea : Input;
|
||||
const onValueChange = useCallback(
|
||||
(e: React.SyntheticEvent) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ const LOCAL_STORAGE_KEY = 'grafana.dashboard.timepicker.history';
|
||||
|
||||
interface Props extends Omit<TimeRangePickerProps, 'history' | 'theme'> {}
|
||||
|
||||
export const TimePickerWithHistory: React.FC<Props> = (props) => {
|
||||
export const TimePickerWithHistory = (props: Props) => {
|
||||
return (
|
||||
<LocalStorageValueProvider<TimeRange[]> storageKey={LOCAL_STORAGE_KEY} defaultValue={[]}>
|
||||
{(values, onSaveToStore) => {
|
||||
|
||||
Reference in New Issue
Block a user