@curveball/browser
Version:
Automatic API browser generator. A middleware that turns your JSON responses into HTML if accessed by a browser.
24 lines (23 loc) • 750 B
TypeScript
import * as React from 'react';
type Props = {
/**
* The HTTP method associated with this button.
*/
method: string;
/**
* The label of the button. If this is not provided, we'll guess it based
* on the HTTP method and titleHint.
*/
title?: string | null;
/**
* If provided, we'll try to extract a good button label from this.
* Currently we just look for the first word in this string and if it
* matches a known verb we use that as the label.
*
* For example the titleHint might be 'Edit This User', in which case
* the label for the button just becomes 'Edit'.
*/
titleHint?: string;
};
export declare function Button(props: Props): React.JSX.Element;
export {};