fix: create modal sizing
This commit is contained in:
@@ -97,7 +97,7 @@ export function CreateServerModal({ isOpen, onClose }: CreateServerModalProps) {
|
|||||||
>
|
>
|
||||||
{isSubmitting ? (
|
{isSubmitting ? (
|
||||||
<>
|
<>
|
||||||
<LoadingSpinner className="h-4 w-4" />
|
<LoadingSpinner size="sm" />
|
||||||
Creating...
|
Creating...
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -34,16 +34,19 @@ export function Modal({ isOpen, onClose, title, children, className }: ModalProp
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4">
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4">
|
||||||
<div className="absolute inset-0" onClick={onClose} />
|
<div className="absolute inset-0" onClick={onClose} aria-label="Close" />
|
||||||
<div
|
<div
|
||||||
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
aria-labelledby="modal-title"
|
||||||
className={cn(
|
className={cn(
|
||||||
'relative w-full max-w-md rounded-lg border border-border bg-canvas p-6 shadow-xl',
|
'relative w-full max-w-md rounded-lg border border-border bg-canvas p-6 shadow-xl',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<h3 className="text-lg font-semibold text-primary">{title}</h3>
|
<h3 id="modal-title" className="text-lg font-semibold text-primary">{title}</h3>
|
||||||
<button onClick={onClose} className="text-muted hover:text-primary">
|
<button onClick={onClose} className="text-muted hover:text-primary" aria-label="Close modal">
|
||||||
×
|
×
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export type Permission = z.infer<typeof permissionSchema>;
|
|||||||
export const roleSchema = z.object({
|
export const roleSchema = z.object({
|
||||||
id: z.uuid(),
|
id: z.uuid(),
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
permissions: z.array(permissionSchema)
|
permissions: z.array(permissionSchema).nullable()
|
||||||
});
|
});
|
||||||
|
|
||||||
export type Role = z.infer<typeof roleSchema>;
|
export type Role = z.infer<typeof roleSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user