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
17 lines
690 B
TypeScript
17 lines
690 B
TypeScript
import { ComponentChild, FunctionComponent } from "preact"
|
|
import { useState } from "preact/hooks"
|
|
import style from "./ListItem.module.scss";
|
|
import { ChevronDownIcon, ChevronUpIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
|
|
|
export const ListItem: FunctionComponent<{text: ComponentChild}> = ({ text, children }) => {
|
|
const [expand, setExpand] = useState(false);
|
|
|
|
return <div className={style.root}>
|
|
<h3 className={style.header} onClick={() => setExpand(!expand)}>
|
|
{text} {expand ? <ChevronUpIcon /> : <ChevronDownIcon />}
|
|
</h3>
|
|
<div className={style.contents}>
|
|
{expand && children}
|
|
</div>
|
|
</div>
|
|
} |