Back/Forward buttons
This commit is contained in:
1 parent
8e78fbc7ec
commit
925174db79
4 files changed
+63
-1
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import react from 'react';
|
||||
import { IonButton, IonIcon } from '@ionic/react';
|
||||
import { arrowBackCircleOutline } from 'ionicons/icons';
|
||||
import './BackForward.css';
|
||||
|
||||
export interface BackProperties {}
|
||||
|
||||
export const Back: react.FC<BackProperties> = (props: BackProperties) => {
|
||||
const onClickHandler = (event: any) => {
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
return (
|
||||
<IonButton
|
||||
onClick={onClickHandler}
|
||||
size='large'
|
||||
className='back-forward'
|
||||
shape='round'
|
||||
fill='solid'
|
||||
>
|
||||
<IonIcon slot='icon-only' icon={arrowBackCircleOutline} />
|
||||
</IonButton>
|
||||
);
|
||||
};
|
||||
|
||||
export default Back;
|
||||
@@ -0,0 +1,5 @@
|
||||
ion-button.back-forward {
|
||||
--opacity: 0.6;
|
||||
--ion-background-color: white;
|
||||
--ionicon-stroke-width: 48px;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import react from 'react';
|
||||
import { IonButton, IonIcon } from '@ionic/react';
|
||||
import { arrowForwardCircleOutline } from 'ionicons/icons';
|
||||
import './BackForward.css';
|
||||
|
||||
export interface ForwardProperties {}
|
||||
|
||||
export const Forward: react.FC<ForwardProperties> = (props: ForwardProperties) => {
|
||||
const onClickHandler = (event: any) => {
|
||||
window.history.forward();
|
||||
};
|
||||
|
||||
return (
|
||||
<IonButton
|
||||
onClick={onClickHandler}
|
||||
size='large'
|
||||
className='back-forward'
|
||||
shape='round'
|
||||
fill='solid'
|
||||
>
|
||||
<IonIcon slot='icon-only' icon={arrowForwardCircleOutline} />
|
||||
</IonButton>
|
||||
);
|
||||
};
|
||||
|
||||
export default Forward;
|
||||
Reference in new issue
Block a user