Compare commits
5 Commits
develop/mo
...
develop/mo
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2b71d06c8d | ||
![]() |
3ec9d87f8b | ||
![]() |
546fb72732 | ||
![]() |
4303704753 | ||
![]() |
4bb213ef0c |
@@ -13,8 +13,9 @@ import {
|
||||
IonThumbnail,
|
||||
} from '@ionic/react';
|
||||
import { pulseOutline, sunnyOutline, thermometerOutline } from 'ionicons/icons';
|
||||
import React from 'react';
|
||||
|
||||
export const SkeletonDashboard = () => (
|
||||
export const SkeletonDashboard = (): React.JSX.Element => (
|
||||
<IonGrid>
|
||||
<IonCard>
|
||||
<IonCardContent className="ion-text-center">
|
||||
|
@@ -1,19 +1,19 @@
|
||||
import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react';
|
||||
import { IonRouterOutlet, IonTabs } from '@ionic/react';
|
||||
|
||||
import { cloudOutline, searchOutline } from 'ionicons/icons';
|
||||
import { Route, Redirect } from 'react-router';
|
||||
|
||||
import Tab1 from './AppPages/Tab1';
|
||||
import Tab2 from './AppPages/Tab2';
|
||||
// import Tab1 from './AppPages/Tab1';
|
||||
// import Tab2 from './AppPages/Tab2';
|
||||
|
||||
import Home from './pages/Home.jsx';
|
||||
import Home from './pages/Home';
|
||||
import Account from './pages/Account';
|
||||
import AddCard from './pages/AddCard';
|
||||
import AddTransaction from './pages/AddTransaction';
|
||||
|
||||
import './style.scss';
|
||||
import React from 'react';
|
||||
|
||||
function DemoBankingUi() {
|
||||
function DemoBankingUi(): React.JSX.Element {
|
||||
return (
|
||||
<IonTabs className="demo-banking-ui">
|
||||
<IonRouterOutlet>
|
||||
|
@@ -1,5 +1,17 @@
|
||||
import { useRef, useState } from 'react';
|
||||
import { IonButton, IonButtons, IonContent, IonGrid, IonHeader, IonIcon, IonPage, IonTitle, IonToolbar, useIonRouter, useIonViewDidEnter } from '@ionic/react';
|
||||
import {
|
||||
IonButton,
|
||||
IonButtons,
|
||||
IonContent,
|
||||
IonGrid,
|
||||
IonHeader,
|
||||
IonIcon,
|
||||
IonPage,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
useIonRouter,
|
||||
useIonViewDidEnter,
|
||||
} from '@ionic/react';
|
||||
import styles from './Home.module.css';
|
||||
import { AccountStore } from '../data/AccountStore';
|
||||
import CardSlide from '../components/CardSlide';
|
||||
@@ -22,7 +34,7 @@ const Home = () => {
|
||||
const [mainColor, setMainColor] = useState(cards[0].color);
|
||||
const [slideSpace, setSlideSpace] = useState(10);
|
||||
|
||||
const slidesRef = useRef();
|
||||
const slidesRef = useRef(null);
|
||||
|
||||
useIonViewDidEnter(() => {
|
||||
setSlideSpace(0);
|
||||
@@ -38,7 +50,9 @@ const Home = () => {
|
||||
document.getElementById(`slide_${swiperIndex}_balance`).classList.add('animate__headShake');
|
||||
|
||||
setTimeout(() => {
|
||||
document.getElementById(`slide_${swiperIndex}_balance`).classList.remove('animate__headShake');
|
||||
document
|
||||
.getElementById(`slide_${swiperIndex}_balance`)
|
||||
.classList.remove('animate__headShake');
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
@@ -47,9 +61,13 @@ const Home = () => {
|
||||
const swiperIndex = swiper.activeIndex;
|
||||
|
||||
if (touched) {
|
||||
document.getElementById(`slide_${swiperIndex}_transactions`).classList.add('animate__fadeOut');
|
||||
document
|
||||
.getElementById(`slide_${swiperIndex}_transactions`)
|
||||
.classList.add('animate__fadeOut');
|
||||
} else {
|
||||
document.getElementById(`slide_${swiperIndex}_transactions`).classList.remove('animate__fadeOut');
|
||||
document
|
||||
.getElementById(`slide_${swiperIndex}_transactions`)
|
||||
.classList.remove('animate__fadeOut');
|
||||
document.getElementById(`slide_${swiperIndex}_transactions`).classList.add('animate__fadeIn');
|
||||
}
|
||||
};
|
||||
@@ -70,7 +88,11 @@ const Home = () => {
|
||||
routerLink="/demo-banking-ui/account"
|
||||
className={stylesS.toolbarAvatar}
|
||||
>
|
||||
<img alt="toolbar avatar" className={stylesS.toolbarAvatarImage} src={profile.avatar} />
|
||||
<img
|
||||
alt="toolbar avatar"
|
||||
className={stylesS.toolbarAvatarImage}
|
||||
src={profile.avatar}
|
||||
/>
|
||||
</IonButton>
|
||||
</IonButtons>
|
||||
|
||||
@@ -82,7 +104,11 @@ const Home = () => {
|
||||
</IonButton>
|
||||
{/* */}
|
||||
<IonButton>
|
||||
<IonIcon color="light" icon={searchOutline} style={{ backgroundColor: mainColor, borderRadius: '500px', padding: '0.2rem' }} />
|
||||
<IonIcon
|
||||
color="light"
|
||||
icon={searchOutline}
|
||||
style={{ backgroundColor: mainColor, borderRadius: '500px', padding: '0.2rem' }}
|
||||
/>
|
||||
</IonButton>
|
||||
</IonButtons>
|
||||
</IonToolbar>
|
||||
@@ -101,7 +127,11 @@ const Home = () => {
|
||||
>
|
||||
{cards.map((card, index) => {
|
||||
return (
|
||||
<SwiperSlide key={`slide_${index}`} id={`slide_${index}`} className={stylesS.customSlide}>
|
||||
<SwiperSlide
|
||||
key={`slide_${index}`}
|
||||
id={`slide_${index}`}
|
||||
className={stylesS.customSlide}
|
||||
>
|
||||
<CardSlide key={index} card={card} profile={profile} index={index} />
|
||||
</SwiperSlide>
|
||||
);
|
||||
|
@@ -23,7 +23,7 @@ import { TalkCard } from '../components/TalkCard';
|
||||
import { useRef } from 'react';
|
||||
|
||||
const Tab1 = () => {
|
||||
const pageRef = useRef();
|
||||
const pageRef = useRef(null);
|
||||
const talks = useStoreState(TalkStore, getTalks);
|
||||
|
||||
const router = useIonRouter();
|
||||
|
@@ -24,7 +24,7 @@ import { getFavourites, getSearchCount } from '../store/Selectors';
|
||||
|
||||
const Tab1 = () => {
|
||||
const router = useIonRouter();
|
||||
const pageRef = useRef();
|
||||
const pageRef = useRef(null);
|
||||
const favourites = useStoreState(WordStore, getFavourites);
|
||||
const searchCount = useStoreState(WordStore, getSearchCount);
|
||||
|
||||
|
@@ -17,7 +17,7 @@ import { WordStore } from '../store';
|
||||
import { searchWord } from '../utils';
|
||||
|
||||
const Tab2 = () => {
|
||||
const pageRef = useRef();
|
||||
const pageRef = useRef(null);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
const [searchResult, setSearchResult] = useState(false);
|
||||
const [animatedClass, setAnimatedClass] = useState('');
|
||||
|
@@ -7,7 +7,7 @@ import { WordStore } from '../store';
|
||||
import { getFavourites } from '../store/Selectors';
|
||||
|
||||
const Tab3 = () => {
|
||||
const pageRef = useRef();
|
||||
const pageRef = useRef(null);
|
||||
const favourites = useStoreState(WordStore, getFavourites);
|
||||
const [animatedClass, setAnimatedClass] = useState('animate__slideInLeft');
|
||||
|
||||
|
@@ -30,7 +30,7 @@ const Home = (): React.JSX.Element => {
|
||||
|
||||
return (
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonHeader className="ion-no-border">
|
||||
<IonToolbar>
|
||||
<IonTitle>Posts TS</IonTitle>
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react';
|
||||
import { IonRouterOutlet, IonTabs } from '@ionic/react';
|
||||
|
||||
import { cloudOutline, searchOutline } from 'ionicons/icons';
|
||||
import { Route, Redirect } from 'react-router';
|
||||
|
||||
import './theme/variables.scss';
|
||||
import Home from './pages/Home';
|
||||
import React from 'react';
|
||||
|
||||
function DemoStickyBottomSheetExample() {
|
||||
function DemoStickyBottomSheetExample(): React.JSX.Element {
|
||||
return (
|
||||
<IonTabs className="demo-sticky-bottom-sheet-example">
|
||||
<IonRouterOutlet>
|
||||
@@ -20,18 +20,6 @@ function DemoStickyBottomSheetExample() {
|
||||
to="/demo-sticky-bottom-sheet-example/home"
|
||||
/>
|
||||
</IonRouterOutlet>
|
||||
|
||||
{/* */}
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="tab1" href="/demo-sticky-bottom-sheet-example/tab1">
|
||||
<IonIcon icon={cloudOutline} />
|
||||
<IonLabel>Dashboard</IonLabel>
|
||||
</IonTabButton>
|
||||
<IonTabButton tab="tab2" href="/demo-sticky-bottom-sheet-example/tab2">
|
||||
<IonIcon icon={searchOutline} />
|
||||
<IonLabel>Search</IonLabel>
|
||||
</IonTabButton>
|
||||
</IonTabBar>
|
||||
</IonTabs>
|
||||
);
|
||||
}
|
||||
|
@@ -9,12 +9,12 @@ import {
|
||||
IonToolbar,
|
||||
useIonRouter,
|
||||
} from '@ionic/react';
|
||||
import { useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { BottomSheet } from '../components/BottomSheet';
|
||||
import './Home.scss';
|
||||
import { chevronBackOutline } from 'ionicons/icons';
|
||||
|
||||
const Home: React.FC = () => {
|
||||
const Home = (): React.JSX.Element => {
|
||||
const [showBottomSheet, setShowBottomSheet] = useState<boolean>(true);
|
||||
|
||||
const handleClose = () => {
|
||||
@@ -31,7 +31,7 @@ const Home: React.FC = () => {
|
||||
|
||||
return (
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonHeader className="ion-no-border">
|
||||
<IonToolbar>
|
||||
<IonTitle>Ionic Sticky Bottom Sheet</IonTitle>
|
||||
|
||||
|
@@ -3,79 +3,77 @@
|
||||
http://ionicframework.com/docs/theming/ */
|
||||
|
||||
/** Ionic CSS Variables **/
|
||||
:root {
|
||||
/** primary **/
|
||||
--ion-color-primary: #3880ff;
|
||||
--ion-color-primary-rgb: 56, 128, 255;
|
||||
--ion-color-primary-contrast: #ffffff;
|
||||
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-primary-shade: #3171e0;
|
||||
--ion-color-primary-tint: #4c8dff;
|
||||
/** primary **/
|
||||
--ion-color-primary: #3880ff;
|
||||
--ion-color-primary-rgb: 56, 128, 255;
|
||||
--ion-color-primary-contrast: #ffffff;
|
||||
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-primary-shade: #3171e0;
|
||||
--ion-color-primary-tint: #4c8dff;
|
||||
|
||||
/** secondary **/
|
||||
--ion-color-secondary: #3dc2ff;
|
||||
--ion-color-secondary-rgb: 61, 194, 255;
|
||||
--ion-color-secondary-contrast: #ffffff;
|
||||
--ion-color-secondary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-secondary-shade: #36abe0;
|
||||
--ion-color-secondary-tint: #50c8ff;
|
||||
/** secondary **/
|
||||
--ion-color-secondary: #3dc2ff;
|
||||
--ion-color-secondary-rgb: 61, 194, 255;
|
||||
--ion-color-secondary-contrast: #ffffff;
|
||||
--ion-color-secondary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-secondary-shade: #36abe0;
|
||||
--ion-color-secondary-tint: #50c8ff;
|
||||
|
||||
/** tertiary **/
|
||||
--ion-color-tertiary: #5260ff;
|
||||
--ion-color-tertiary-rgb: 82, 96, 255;
|
||||
--ion-color-tertiary-contrast: #ffffff;
|
||||
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-tertiary-shade: #4854e0;
|
||||
--ion-color-tertiary-tint: #6370ff;
|
||||
/** tertiary **/
|
||||
--ion-color-tertiary: #5260ff;
|
||||
--ion-color-tertiary-rgb: 82, 96, 255;
|
||||
--ion-color-tertiary-contrast: #ffffff;
|
||||
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-tertiary-shade: #4854e0;
|
||||
--ion-color-tertiary-tint: #6370ff;
|
||||
|
||||
/** success **/
|
||||
--ion-color-success: #2dd36f;
|
||||
--ion-color-success-rgb: 45, 211, 111;
|
||||
--ion-color-success-contrast: #ffffff;
|
||||
--ion-color-success-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-success-shade: #28ba62;
|
||||
--ion-color-success-tint: #42d77d;
|
||||
/** success **/
|
||||
--ion-color-success: #2dd36f;
|
||||
--ion-color-success-rgb: 45, 211, 111;
|
||||
--ion-color-success-contrast: #ffffff;
|
||||
--ion-color-success-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-success-shade: #28ba62;
|
||||
--ion-color-success-tint: #42d77d;
|
||||
|
||||
/** warning **/
|
||||
--ion-color-warning: #ffc409;
|
||||
--ion-color-warning-rgb: 255, 196, 9;
|
||||
--ion-color-warning-contrast: #000000;
|
||||
--ion-color-warning-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-warning-shade: #e0ac08;
|
||||
--ion-color-warning-tint: #ffca22;
|
||||
/** warning **/
|
||||
--ion-color-warning: #ffc409;
|
||||
--ion-color-warning-rgb: 255, 196, 9;
|
||||
--ion-color-warning-contrast: #000000;
|
||||
--ion-color-warning-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-warning-shade: #e0ac08;
|
||||
--ion-color-warning-tint: #ffca22;
|
||||
|
||||
/** danger **/
|
||||
--ion-color-danger: #eb445a;
|
||||
--ion-color-danger-rgb: 235, 68, 90;
|
||||
--ion-color-danger-contrast: #ffffff;
|
||||
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-danger-shade: #cf3c4f;
|
||||
--ion-color-danger-tint: #ed576b;
|
||||
/** danger **/
|
||||
--ion-color-danger: #eb445a;
|
||||
--ion-color-danger-rgb: 235, 68, 90;
|
||||
--ion-color-danger-contrast: #ffffff;
|
||||
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-danger-shade: #cf3c4f;
|
||||
--ion-color-danger-tint: #ed576b;
|
||||
|
||||
/** dark **/
|
||||
--ion-color-dark: #222428;
|
||||
--ion-color-dark-rgb: 34, 36, 40;
|
||||
--ion-color-dark-contrast: #ffffff;
|
||||
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-dark-shade: #1e2023;
|
||||
--ion-color-dark-tint: #383a3e;
|
||||
/** dark **/
|
||||
--ion-color-dark: #222428;
|
||||
--ion-color-dark-rgb: 34, 36, 40;
|
||||
--ion-color-dark-contrast: #ffffff;
|
||||
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-dark-shade: #1e2023;
|
||||
--ion-color-dark-tint: #383a3e;
|
||||
|
||||
/** medium **/
|
||||
--ion-color-medium: #92949c;
|
||||
--ion-color-medium-rgb: 146, 148, 156;
|
||||
--ion-color-medium-contrast: #ffffff;
|
||||
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-medium-shade: #808289;
|
||||
--ion-color-medium-tint: #9d9fa6;
|
||||
/** medium **/
|
||||
--ion-color-medium: #92949c;
|
||||
--ion-color-medium-rgb: 146, 148, 156;
|
||||
--ion-color-medium-contrast: #ffffff;
|
||||
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
||||
--ion-color-medium-shade: #808289;
|
||||
--ion-color-medium-tint: #9d9fa6;
|
||||
|
||||
/** light **/
|
||||
--ion-color-light: #f4f5f8;
|
||||
--ion-color-light-rgb: 244, 245, 248;
|
||||
--ion-color-light-contrast: #000000;
|
||||
--ion-color-light-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-light-shade: #d7d8da;
|
||||
--ion-color-light-tint: #f5f6f9;
|
||||
}
|
||||
/** light **/
|
||||
--ion-color-light: #f4f5f8;
|
||||
--ion-color-light-rgb: 244, 245, 248;
|
||||
--ion-color-light-contrast: #000000;
|
||||
--ion-color-light-contrast-rgb: 0, 0, 0;
|
||||
--ion-color-light-shade: #d7d8da;
|
||||
--ion-color-light-tint: #f5f6f9;
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user