1
0
Fork 0

wip(org): Work on account/welcome pages

This commit is contained in:
joostdecock 2023-02-12 18:35:54 +01:00
parent 424c15c723
commit a0a1538aa0
40 changed files with 988 additions and 231 deletions

View file

@ -0,0 +1,31 @@
import { Spinner } from 'shared/components/spinner.mjs'
import { useTranslation } from 'next-i18next'
export const SaveSettingsButton = ({ email, app, btnProps = {}, welcome = false }) => {
const { t } = useTranslation(['account'])
let classes = 'btn mt-4 capitalize '
if (welcome) {
classes += 'w-64 '
if (app.loading) classes += 'btn-accent '
else classes += 'btn-secondary '
} else {
classes += 'w-full '
if (app.loading) classes += 'btn-accent '
else classes += 'btn-primary '
}
return (
<button className={classes} tabIndex="-1" role="button" {...btnProps}>
<span className="flex flex-row items-center gap-2">
{app.loading ? (
<>
<Spinner />
<span>{t('processing')}</span>
</>
) : (
<span>{t('save')}</span>
)}
</span>
</button>
)
}