mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00

* Add logic to enable generic hook expiry * Add storage for hook expiry warnings. * Migrate generic hooks / add expiry field * Allow reporting a specific error and status code for generic webhooks * Report the specific error when a message fails to send * Refactor input class to better support datetime * Remove single use of innerChild * Add UI support for expiry configuration * Add new packages * Add warnings when the timer is about to expire. * Add send expiry notice config option * lint * document new option s * Fixup test * Add tests for expiry * Add textual command for setting a duration on a webhook. * Add e2e test for inbound hooks. * changelog * Add a configuration option to force webhooks to expire. * update config.sample.yml * fix field not working
14 lines
445 B
TypeScript
14 lines
445 B
TypeScript
import { FunctionComponent, h } from "preact";
|
|
import style from "./Button.module.scss";
|
|
|
|
interface ButtonProps extends h.JSX.HTMLAttributes<HTMLButtonElement> {
|
|
intent?: "remove";
|
|
}
|
|
|
|
export const Button: FunctionComponent<ButtonProps> = (props) => {
|
|
let className = style.button;
|
|
if (props.intent === "remove") {
|
|
className += ` ${style.remove}`;
|
|
}
|
|
return <button type="button" className={className} {...props} />;
|
|
}
|