mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
15 lines
442 B
TypeScript
15 lines
442 B
TypeScript
import classnames from 'classnames';
|
|
import React, { FunctionComponent } from 'react';
|
|
|
|
import { useGrpcRequestState } from '../context/grpc';
|
|
|
|
interface Props {
|
|
className?: string;
|
|
requestId: string;
|
|
}
|
|
|
|
export const GrpcSpinner: FunctionComponent<Props> = ({ className, requestId }) => {
|
|
const { running } = useGrpcRequestState(requestId);
|
|
return running ? <i className={classnames('fa fa-refresh fa-spin', className)} /> : null;
|
|
};
|