Work required to support the JWT plugin

This commit is contained in:
Gregory Schier
2025-01-17 14:36:55 -08:00
parent 153a40cfb1
commit 6ae0bc1ef6
31 changed files with 300 additions and 170 deletions

View File

@@ -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>
);
}