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 Oct 31, 2024
1 parent 834083b commit 0faea6b
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 0faea6b

Please sign in to comment.