Skip to content

Commit

Permalink
refactor(Help): refactor Help page style to reflect the rest of the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelko committed Nov 12, 2024
1 parent 7577c60 commit 90aad82
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions packages/hawtio/src/help/HawtioHelp.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import {
Card,
CardBody,
Divider,
Nav,
NavItem,
NavList,
PageGroup,
PageNavigation,
PageSection,
PageSectionVariants,
TextContent,
Expand Down Expand Up @@ -40,38 +38,37 @@ export const HawtioHelp: React.FunctionComponent = () => {
<PageSection variant={PageSectionVariants.light}>
<Title headingLevel='h1'>Help</Title>
</PageSection>
<PageGroup>
<PageNavigation>
<Nav aria-label='Nav' variant='tertiary'>
<NavList>
{helps.map(help => (
<NavItem key={help.id} isActive={location.pathname === `/help/${help.id}`}>
<NavLink to={help.id}>{help.title}</NavLink>
</NavItem>
))}
</NavList>
</Nav>
</PageNavigation>
</PageGroup>
<PageSection>
<Card isFullHeight>
<Routes>
{helpRegistry.getHelps().map(help => (
<Route
key={help.id}
path={help.id}
element={
<CardBody>
<TextContent>
<Markdown>{help.content}</Markdown>
</TextContent>
</CardBody>
}
/>
<Divider />

<PageSection type='tabs' hasShadowBottom>
<Nav aria-label='Nav' variant='tertiary'>
<NavList>
{helps.map(help => (
<NavItem key={help.id} isActive={location.pathname === `/help/${help.id}`}>
<NavLink to={help.id}>{help.title}</NavLink>
</NavItem>
))}
<Route path='/' element={<Navigate to='home' />} />
</Routes>
</Card>
</NavList>
</Nav>
</PageSection>
<Divider />
<PageSection variant={PageSectionVariants.light}>
<Routes>
{helpRegistry.getHelps().map(help => (
<Route
key={help.id}
path={help.id}
element={
<CardBody>
<TextContent>
<Markdown>{help.content}</Markdown>
</TextContent>
</CardBody>
}
/>
))}
<Route path='/' element={<Navigate to='home' />} />
</Routes>
</PageSection>
</React.Fragment>
)
Expand Down

0 comments on commit 90aad82

Please sign in to comment.