Add helper components for UI
Changes:
- Extracted Copyright from LoginDialog file to its own
- Added some helper components
- Removed unnecessary setup from welcome animation
- Added custom React type for svg element
- Fixed ThemeDemonstrator
GitLab: #12
Change-Id: Ie7158520983dab5c7069f179b6f9531b5106ba85
diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx
index 39e222b..9f3978d 100644
--- a/client/src/components/welcome.jsx
+++ b/client/src/components/welcome.jsx
@@ -15,10 +15,12 @@
* License along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
-import { Button, Container } from '@mui/material';
+import { Container } from '@mui/material';
import { AnimatePresence, motion } from 'framer-motion';
import { useState } from 'react';
+import { ReactComponent as JamiLogo } from '../icons/jami-logo-icon.svg';
+
const list = {
hidden: { opacity: 0 },
visible: {
@@ -49,29 +51,15 @@
onAnimationComplete={(a) => {
if (a === 'hidden') {
props.onComplete();
- } else if (!props.showSetup) {
+ } else {
setVisible(false);
}
}}
>
<motion.div variants={item}>
- <img
- src="/jami-logo-icon.svg"
- style={{
- width: '32',
- height: '32',
- }}
- alt="jami n/logo"
- />
+ <JamiLogo width="95%" />
</motion.div>
<motion.h1 variants={item}>Welcome to Jami</motion.h1>
- {props.showSetup && (
- <motion.div variants={item}>
- <Button variant="outlined" onClick={() => setVisible(false)}>
- Start setup
- </Button>
- </motion.div>
- )}
</motion.div>
)}
</AnimatePresence>