mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 11:21:16 +01:00
Copy on "type to confirm" dialog
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Color } from '@yaakapp-internal/plugins';
|
||||
import type { FormEvent } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { CopyIconButton } from '../CopyIconButton';
|
||||
import { Button } from './Button';
|
||||
import { PlainInput } from './PlainInput';
|
||||
import { HStack } from './Stacks';
|
||||
@@ -42,10 +43,20 @@ export function Confirm({
|
||||
<PlainInput
|
||||
autoFocus
|
||||
onChange={setConfirm}
|
||||
placeholder={requireTyping}
|
||||
label={
|
||||
<>
|
||||
Type <strong className="!select-auto cursor-auto">{requireTyping}</strong> to confirm
|
||||
</>
|
||||
<div className="flex items-center justify-between">
|
||||
<p>
|
||||
Type <strong>{requireTyping}</strong> to confirm
|
||||
</p>
|
||||
<CopyIconButton
|
||||
text={requireTyping}
|
||||
title="Copy name"
|
||||
className="text-text-subtlest ml-auto"
|
||||
iconSize="sm"
|
||||
size="2xs"
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -30,7 +30,7 @@ export function Label({
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<span>
|
||||
<span className="inline-block w-full">
|
||||
{children}
|
||||
{required === true && <span className="text-text-subtlest">*</span>}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user