M: Use float property instead of overlay

This commit is contained in:
Ivan 2024-12-18 21:26:44 +03:00
parent 48289b2609
commit e40fd197b9

View File

@ -12,7 +12,6 @@ import BadgeHelp from '../info/BadgeHelp';
import { CProps } from '../props'; import { CProps } from '../props';
import Button from './Button'; import Button from './Button';
import MiniButton from './MiniButton'; import MiniButton from './MiniButton';
import Overlay from './Overlay';
export interface ModalProps extends CProps.Styling { export interface ModalProps extends CProps.Styling {
/** Title of the modal window. */ /** Title of the modal window. */
@ -105,20 +104,20 @@ function Modal({
'border rounded-xl bg-prim-100' 'border rounded-xl bg-prim-100'
)} )}
> >
<Overlay position='right-2 top-2'>
<MiniButton
noPadding
titleHtml={prepareTooltip('Закрыть диалоговое окно', 'ESC')}
icon={<IconClose size='1.25rem' />}
onClick={handleCancel}
/>
</Overlay>
{helpTopic && !hideHelpWhen?.() ? ( {helpTopic && !hideHelpWhen?.() ? (
<Overlay position='left-2 top-2'> <div className='float-left mt-2 ml-2'>
<BadgeHelp topic={helpTopic} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} padding='p-0' /> <BadgeHelp topic={helpTopic} className={clsx(PARAMETER.TOOLTIP_WIDTH, 'sm:max-w-[40rem]')} padding='p-0' />
</Overlay> </div>
) : null} ) : null}
<MiniButton
noPadding
titleHtml={prepareTooltip('Закрыть диалоговое окно', 'ESC')}
icon={<IconClose size='1.25rem' />}
className='float-right mt-2 mr-2'
onClick={handleCancel}
/>
{header ? <h1 className='px-12 py-2 select-none'>{header}</h1> : null} {header ? <h1 className='px-12 py-2 select-none'>{header}</h1> : null}
<div <div