mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 23:31:21 +02:00
Work required to support the JWT plugin
This commit is contained in:
@@ -4,13 +4,23 @@ import type { HTMLAttributes } from 'react';
|
||||
export function Label({
|
||||
htmlFor,
|
||||
className,
|
||||
optional,
|
||||
children,
|
||||
...props
|
||||
}: HTMLAttributes<HTMLLabelElement> & { htmlFor: string }) {
|
||||
}: HTMLAttributes<HTMLLabelElement> & { htmlFor: string; optional?: boolean }) {
|
||||
return (
|
||||
<label
|
||||
className={classNames(className, 'text-text-subtle whitespace-nowrap')}
|
||||
className={classNames(className, 'text-text-subtle whitespace-nowrap flex items-center gap-1')}
|
||||
htmlFor={htmlFor}
|
||||
{...props}
|
||||
/>
|
||||
>
|
||||
{children}
|
||||
{optional ? (
|
||||
<>
|
||||
{' '}
|
||||
<span className="text-xs text-text-subtlest">(optional)</span>
|
||||
</>
|
||||
) : null}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user