kafka-ui/kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamButton.tsx
German Osin 18f5e1a2b2
Switched messages endpoint to provide sse with phases & consuming info (#645)
* Switched messages endpoint to provide sse with phases & consuming info

* Switched messages endpoint to provide sse with phases & consuming info

* fixed comments

* Fixed comparator

* Fixed tests

* Reduced images size

* Feature/sse for messages (#681)

* [#645] SSE. Cleanup Topic Messages

* New messages page

* Update outdated snapshots

* Specs

* Specs

* Fixed build

* Fixed possible npe in update cluster on init stage

* Provided additional information with messages #677 (to messages_sse branch) (#700)

* Provided additional information with messages #677

* Sse messages front (#725)

* SSE. Messages page

* Fix handleNextClick

* Add the page loader to the list of messages

Co-authored-by: Alexander <mr.afigitelniychuvak@gmail.com>

* Fix merge errors

* fix conflicts

Co-authored-by: Timur Davletov <tdavletov@provectus.com>
Co-authored-by: Oleg Shur <workshur@gmail.com>
Co-authored-by: Alexander <mr.afigitelniychuvak@gmail.com>
2021-08-04 16:30:00 +03:00

29 lines
605 B
TypeScript

import React from 'react';
interface Props {
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
className: string;
type: 'fa-plus' | 'fa-minus' | 'fa-chevron-right';
btnText?: string;
disabled?: boolean;
}
const CustomParamButton: React.FC<Props> = ({
onClick,
className,
type,
btnText,
}) => (
<button
type="button"
className={`button ${className} is-outlined`}
onClick={onClick}
>
{btnText && <span>{btnText}</span>}
<span className="icon">
<i className={`fas fa-lg ${type}`} />
</span>
</button>
);
export default CustomParamButton;