mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 14:12:07 +02:00
Improved prompt function add add ctx.* functions (#301)
This commit is contained in:
@@ -9,7 +9,7 @@ export interface BannerProps {
|
||||
|
||||
export function Banner({ children, className, color }: BannerProps) {
|
||||
return (
|
||||
<div className="w-full mb-auto grid grid-rows-1 max-h-full">
|
||||
<div className="w-auto grid grid-rows-1 max-h-full flex-0">
|
||||
<div
|
||||
className={classNames(
|
||||
className,
|
||||
@@ -18,6 +18,7 @@ export function Banner({ children, className, color }: BannerProps) {
|
||||
'border border-border border-dashed',
|
||||
'px-4 py-2 rounded-lg select-auto',
|
||||
'overflow-auto text-text',
|
||||
'mb-auto', // Don't stretch all the way down if the parent is in grid or flexbox
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -723,6 +723,7 @@ function FileActionsDropdown({
|
||||
id: 'content-type',
|
||||
title: 'Override Content-Type',
|
||||
label: 'Content-Type',
|
||||
required: false,
|
||||
placeholder: 'text/plain',
|
||||
defaultValue: pair.contentType ?? '',
|
||||
confirmText: 'Set',
|
||||
|
||||
@@ -16,6 +16,7 @@ export function Prompt({
|
||||
label,
|
||||
defaultValue,
|
||||
placeholder,
|
||||
password,
|
||||
onResult,
|
||||
required,
|
||||
confirmText,
|
||||
@@ -36,10 +37,10 @@ export function Prompt({
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
<PlainInput
|
||||
hideLabel
|
||||
autoSelect
|
||||
required={required}
|
||||
placeholder={placeholder ?? 'Enter text'}
|
||||
type={password ? 'password' : 'text'}
|
||||
label={label}
|
||||
defaultValue={defaultValue}
|
||||
onChange={setValue}
|
||||
|
||||
Reference in New Issue
Block a user