On the jobs, builds and hives cards the picker was alone on the first line of the body. DisclosureAction puts a body's control in the header of the disclosure it is in, beside the chevron and outside the toggle, so it costs no row and pressing it does not fold the card.
16 lines
714 B
TypeScript
16 lines
714 B
TypeScript
// <DisclosureAction> — a control for the header row of the disclosure it is in:
|
|
// the refresh picker of a card that polls. The body owns the control's state, so
|
|
// a body renders it where it needs the state, and it shows in the header, beside
|
|
// the chevron, instead of taking a row of the body. It is a sibling of the
|
|
// header's toggle, not inside it, so pressing it does not fold the card. A
|
|
// disclosure that is shut has no body, so the control is there only while open.
|
|
import type { ComponentChildren } from "preact";
|
|
import "./DisclosureAction.css";
|
|
|
|
export function DisclosureAction({
|
|
children,
|
|
}: {
|
|
children: ComponentChildren;
|
|
}) {
|
|
return <div class="ui-disclosure-action">{children}</div>;
|
|
}
|