@@ -22,8 +26,4 @@ function Sidemenu({ links }) {
)
}
-Sidemenu.propTypes = {
- links: PropTypes.arrayOf(PropTypes.shape(AppLink.propTypes)).isRequired,
-}
-
export default Sidemenu
diff --git a/src/ui/TabNavigation/TabNavigation.stories.jsx b/src/ui/TabNavigation/TabNavigation.stories.jsx
deleted file mode 100644
index 894cfb3597..0000000000
--- a/src/ui/TabNavigation/TabNavigation.stories.jsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import { MemoryRouter, Route, Switch } from 'react-router-dom'
-
-import TabNavigation from './TabNavigation'
-
-const Template = (args) => (
-
-
-
-
- Repo list :)
-
-
-
- Admin page :)
-
-
-
-)
-
-export const SimpleTabNavigation = Template.bind({})
-SimpleTabNavigation.args = {
- tabs: [
- { pageName: 'owner', children: 'Repos' },
- { pageName: 'accountAdmin', children: 'Settings' },
- ],
-}
-
-export default {
- title: 'Components/TabNavigation',
- component: TabNavigation,
-}
diff --git a/src/ui/TabNavigation/TabNavigation.stories.tsx b/src/ui/TabNavigation/TabNavigation.stories.tsx
new file mode 100644
index 0000000000..52c1fff7bb
--- /dev/null
+++ b/src/ui/TabNavigation/TabNavigation.stories.tsx
@@ -0,0 +1,36 @@
+import { type Meta, type StoryObj } from '@storybook/react'
+import { MemoryRouter, Route, Switch } from 'react-router-dom'
+
+import TabNavigation from './TabNavigation'
+
+const meta: Meta
= {
+ title: 'Components/TabNavigation',
+ component: TabNavigation,
+}
+
+export default meta
+
+type Story = StoryObj
+
+export const SimpleTabNavigation: Story = {
+ args: {
+ tabs: [
+ { pageName: 'owner', children: 'Repos' },
+ { pageName: 'accountAdmin', children: 'Settings' },
+ ],
+ },
+ render: (args) => (
+
+
+
+
+ Repo list :)
+
+
+
+ Admin page :)
+
+
+
+ ),
+}
diff --git a/src/ui/TabNavigation/TabNavigation.test.jsx b/src/ui/TabNavigation/TabNavigation.test.tsx
similarity index 96%
rename from src/ui/TabNavigation/TabNavigation.test.jsx
rename to src/ui/TabNavigation/TabNavigation.test.tsx
index 6de5df24bc..35ec687324 100644
--- a/src/ui/TabNavigation/TabNavigation.test.jsx
+++ b/src/ui/TabNavigation/TabNavigation.test.tsx
@@ -3,7 +3,7 @@ import { MemoryRouter, Route, Switch } from 'react-router-dom'
import TabNavigation from './TabNavigation'
-const wrapper = ({ children }) => (
+const wrapper = ({ children }: { children: React.ReactNode }) => (
diff --git a/src/ui/TabNavigation/TabNavigation.jsx b/src/ui/TabNavigation/TabNavigation.tsx
similarity index 76%
rename from src/ui/TabNavigation/TabNavigation.jsx
rename to src/ui/TabNavigation/TabNavigation.tsx
index 9a763f54b1..a91ebc6506 100644
--- a/src/ui/TabNavigation/TabNavigation.jsx
+++ b/src/ui/TabNavigation/TabNavigation.tsx
@@ -1,8 +1,12 @@
-import PropTypes from 'prop-types'
-
import AppLink from 'shared/AppLink'
-function TabNavigation({ tabs, component }) {
+interface TabNavigationProps {
+ // TODO: will need AppLink to be typed first - should be array of AppLinkProps
+ tabs: any[]
+ component?: React.ReactNode
+}
+
+function TabNavigation({ tabs, component }: TabNavigationProps) {
return (