10 changed files with 292 additions and 323 deletions
@ -1,36 +0,0 @@ |
|||||
import type React from 'react'; |
|
||||
|
|
||||
import { FiSave, FiXCircle } from 'react-icons/fi'; |
|
||||
|
|
||||
import { IconButton } from '@meshtastic/components'; |
|
||||
|
|
||||
export interface FormFooterProps { |
|
||||
dirty?: boolean; |
|
||||
clearAction?: () => void; |
|
||||
saveAction?: () => void; |
|
||||
} |
|
||||
|
|
||||
export const FormFooter = ({ |
|
||||
dirty, |
|
||||
clearAction, |
|
||||
saveAction, |
|
||||
}: FormFooterProps): JSX.Element => { |
|
||||
return ( |
|
||||
<div className="float-right flex gap-2"> |
|
||||
<IconButton |
|
||||
icon={<FiXCircle className="h-5 w-5" />} |
|
||||
disabled={!dirty} |
|
||||
onClick={(): void => { |
|
||||
clearAction && clearAction(); |
|
||||
}} |
|
||||
/> |
|
||||
<IconButton |
|
||||
disabled={!dirty} |
|
||||
onClick={(): void => { |
|
||||
saveAction && saveAction(); |
|
||||
}} |
|
||||
icon={<FiSave className="h-5 w-5" />} |
|
||||
/> |
|
||||
</div> |
|
||||
); |
|
||||
}; |
|
||||
@ -1,31 +0,0 @@ |
|||||
import type React from 'react'; |
|
||||
|
|
||||
type DefaultDivProps = JSX.IntrinsicElements['div']; |
|
||||
|
|
||||
interface BlurProps extends DefaultDivProps { |
|
||||
disableOnMd?: boolean; |
|
||||
} |
|
||||
|
|
||||
export const Blur = ({ |
|
||||
disableOnMd, |
|
||||
className, |
|
||||
onClick, |
|
||||
...props |
|
||||
}: BlurProps): JSX.Element => { |
|
||||
return ( |
|
||||
<div |
|
||||
className={`absolute inset-0 z-20 h-full w-full transition-opacity ${ |
|
||||
disableOnMd ? 'md:hidden' : '' |
|
||||
} ${className}`}
|
|
||||
{...props} |
|
||||
> |
|
||||
<div |
|
||||
onClick={onClick} |
|
||||
className={`absolute inset-0 h-full w-full backdrop-blur-sm backdrop-filter ${ |
|
||||
disableOnMd ? 'md:hidden' : '' |
|
||||
}`}
|
|
||||
tabIndex={0} |
|
||||
></div> |
|
||||
</div> |
|
||||
); |
|
||||
}; |
|
||||
Loading…
Reference in new issue