Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Help): refactor Help page style to reflect the rest of the UI #1201

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion packages/hawtio/src/preferences/HomePreferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ResetForm: React.FunctionComponent = () => {
<FormHelperText>
<HelperText>
<HelperTextItem>
Clear all custom settings stored in your browser `&apos;`s local storage and reset to defaults.
Clear all custom settings stored in your browser`s local storage and reset to defaults.
</HelperTextItem>
</HelperText>
</FormHelperText>
Expand Down
Loading