| 1 |
import { loaderSiteCreation } from '@auto-launch/icons'; |
| 2 |
import { AnimatePresence, motion } from 'framer-motion'; |
| 3 |
|
| 4 |
export const StatusMessage = ({ message }) => ( |
| 5 |
<div className="overflow-hidden [height:calc(var(--ext-ui-status-size,0.875rem)*1.5)]"> |
| 6 |
<AnimatePresence mode="wait"> |
| 7 |
{message ? ( |
| 8 |
<motion.p |
| 9 |
key={message} |
| 10 |
initial={{ opacity: 0, y: 8 }} |
| 11 |
animate={{ opacity: 1, y: 0 }} |
| 12 |
exit={{ opacity: 0 }} |
| 13 |
transition={{ duration: 0.25 }} |
| 14 |
className="m-0 text-ui-status font-ui-status text-center status-animation" |
| 15 |
> |
| 16 |
{message} |
| 17 |
</motion.p> |
| 18 |
) : null} |
| 19 |
</AnimatePresence> |
| 20 |
</div> |
| 21 |
); |
| 22 |
|
| 23 |
export const LoaderGraphic = ({ src }) => { |
| 24 |
if (src) { |
| 25 |
return ( |
| 26 |
<img |
| 27 |
src={src} |
| 28 |
alt="" |
| 29 |
className="h-ui-loader w-auto max-w-full rounded-ui-loader object-contain" |
| 30 |
/> |
| 31 |
); |
| 32 |
} |
| 33 |
|
| 34 |
return ( |
| 35 |
<div className="h-ui-loader overflow-hidden rounded-ui-loader [color:var(--ext-ui-loader-color,var(--color-ui-action))] [&>svg]:h-full [&>svg]:w-auto"> |
| 36 |
{loaderSiteCreation} |
| 37 |
</div> |
| 38 |
); |
| 39 |
}; |
| 40 |
|