mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
test(react): migrate to builder architecture (#26959)
This commit is contained in:
23
packages/react/test/base/src/pages/Tabs.tsx
Normal file
23
packages/react/test/base/src/pages/Tabs.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import { IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react';
|
||||
import { Route, Redirect } from 'react-router';
|
||||
|
||||
interface TabsProps {}
|
||||
|
||||
const Tabs: React.FC<TabsProps> = () => {
|
||||
return (
|
||||
<IonTabs>
|
||||
<IonRouterOutlet>
|
||||
<Redirect from="/tabs" to="/tabs/tab1" exact />
|
||||
<Route path="/tabs/tab1" render={() => <IonLabel>Tab 1</IonLabel>} />
|
||||
</IonRouterOutlet>
|
||||
<IonTabBar slot="bottom">
|
||||
<IonTabButton tab="tab1" onClick={() => window.alert('Tab was clicked')}>
|
||||
<IonLabel>Click Handler</IonLabel>
|
||||
</IonTabButton>
|
||||
</IonTabBar>
|
||||
</IonTabs>
|
||||
);
|
||||
};
|
||||
|
||||
export default Tabs;
|
||||
Reference in New Issue
Block a user