diff --git a/apps/ui/src/components/Plan.tsx b/apps/ui/src/components/Plan.tsx new file mode 100644 index 0000000..a4d0d86 --- /dev/null +++ b/apps/ui/src/components/Plan.tsx @@ -0,0 +1,44 @@ +import clsx from 'clsx' +import React, { useState } from 'react' + +interface Step { + title: string + completed: boolean +} + +const Plan: React.FC = () => { + const [steps] = useState([]) + + return ( +
+

Plan

+ + {steps.length === 0 && ( +

+ No plan of action ready yet. +

+ )} + + {steps.map((step, idx) => ( +
+ + + + {step.title} + +
+ ))} +
+ ) +} + +export default Plan diff --git a/apps/ui/src/components/Widgets.tsx b/apps/ui/src/components/Widgets.tsx index 4ed7f83..f487a08 100644 --- a/apps/ui/src/components/Widgets.tsx +++ b/apps/ui/src/components/Widgets.tsx @@ -3,6 +3,31 @@ import { Tab } from '@headlessui/react' import Shell from './Shell' import Editor from './Editor' import WebBrowser from './WebBrowser' +import Plan from './Plan' + +interface Tab { + name: string + component: React.FC +} + +const tabs: Tab[] = [ + { + name: 'Shell', + component: Shell + }, + { + name: 'Browser', + component: WebBrowser + }, + { + name: 'Editor', + component: Editor + }, + { + name: 'Planner', + component: Plan + } +] const Widgets: React.FC = () => { return ( @@ -10,39 +35,32 @@ const Widgets: React.FC = () => {
- - - Shell - - - - - Browser - - - - - Editor - - - - - Planner - - + {tabs.map(tab => ( + + {({ selected }) => ( + + {selected && ( + + + + )} + + {tab.name} + + )} + + ))} - - - - - - - - - - + {tabs.map(tab => ( + + + + ))}