mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-08 14:24:39 +02:00
27 lines
632 B
TypeScript
27 lines
632 B
TypeScript
import * as React from 'react';
|
|
|
|
export interface IActionButtonProps {
|
|
title: JSX.Element | string;
|
|
className?: string;
|
|
disabled?: boolean;
|
|
onClick: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
}
|
|
|
|
const ActionButton: React.FunctionComponent<IActionButtonProps> = ({
|
|
className,
|
|
onClick,
|
|
disabled,
|
|
title
|
|
}: React.PropsWithChildren<IActionButtonProps>) => {
|
|
return (
|
|
<div className={`article__action`}>
|
|
<button onClick={onClick} className={className || ''} disabled={disabled}>
|
|
{title}
|
|
</button>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ActionButton.displayName = 'ActionButton';
|
|
export { ActionButton };
|