mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-22 08:38:29 +02:00
Better dialog padding
This commit is contained in:
@@ -55,7 +55,7 @@ export function Dialog({
|
|||||||
className,
|
className,
|
||||||
'gap-2 grid grid-rows-[auto_minmax(0,1fr)]',
|
'gap-2 grid grid-rows-[auto_minmax(0,1fr)]',
|
||||||
'relative bg-gray-50 pointer-events-auto',
|
'relative bg-gray-50 pointer-events-auto',
|
||||||
'p-5 rounded-lg overflow-auto',
|
'px-6 py-4 rounded-lg overflow-auto',
|
||||||
'dark:border border-highlight shadow shadow-black/10',
|
'dark:border border-highlight shadow shadow-black/10',
|
||||||
'max-w-[90vw] max-h-[calc(100vh-8em)]',
|
'max-w-[90vw] max-h-[calc(100vh-8em)]',
|
||||||
size === 'sm' && 'w-[25rem] max-h-[80vh]',
|
size === 'sm' && 'w-[25rem] max-h-[80vh]',
|
||||||
@@ -66,8 +66,7 @@ export function Dialog({
|
|||||||
>
|
>
|
||||||
{title ? (
|
{title ? (
|
||||||
<Heading size={1} id={titleId}>
|
<Heading size={1} id={titleId}>
|
||||||
{' '}
|
{title}
|
||||||
{title}{' '}
|
|
||||||
</Heading>
|
</Heading>
|
||||||
) : (
|
) : (
|
||||||
<span />
|
<span />
|
||||||
@@ -80,7 +79,7 @@ export function Dialog({
|
|||||||
<div className="ml-auto absolute right-1 top-1">
|
<div className="ml-auto absolute right-1 top-1">
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
title="Close dialog"
|
title="Close dialog (Esc)"
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
size="sm"
|
size="sm"
|
||||||
icon="x"
|
icon="x"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import type { ComponentType, HTMLAttributes } from 'react';
|
import type { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
interface Props extends HTMLAttributes<HTMLHeadingElement> {
|
interface Props extends HTMLAttributes<HTMLHeadingElement> {
|
||||||
size?: 1 | 2 | 3;
|
size?: 1 | 2 | 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user