swarm-ui: the terminal message box has a placeholder and a spinner instead of a label and a sent line
The label 'message <agent>' is the input's placeholder (the label stays for screen readers). The send button shows a spinner over its label while the request is pending and keeps its width, and the 'sent' line is gone: the box empties when the message is held. Spinner is a component of its own now, used by the button and the refresh picker.
This commit is contained in:
parent
5eef1f4a3d
commit
c37205e8f5
1 changed files with 103 additions and 51 deletions
|
|
@ -22,6 +22,7 @@ export function TextField({
|
|||
title,
|
||||
required,
|
||||
placeholder,
|
||||
hideLabel,
|
||||
suggestions,
|
||||
}: {
|
||||
id: string;
|
||||
|
|
@ -33,13 +34,15 @@ export function TextField({
|
|||
title?: string;
|
||||
required?: boolean;
|
||||
placeholder?: string;
|
||||
/** The label is for assistive tech only; the placeholder says it on screen. */
|
||||
hideLabel?: boolean;
|
||||
/** Values to pick from. The field stays free text: a value that is not in
|
||||
* the list can still be typed. */
|
||||
suggestions?: TextFieldSuggestion[];
|
||||
}) {
|
||||
const listId = `${id}-suggestions`;
|
||||
return (
|
||||
<FormField label={label} htmlFor={id}>
|
||||
<FormField label={label} htmlFor={id} hideLabel={hideLabel}>
|
||||
<input
|
||||
id={id}
|
||||
class="ui-form-control"
|
||||
|
|
|
|||
Loading…
Reference in a new issue