-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(NotFound): Improve 404 page styling #324
fix(NotFound): Improve 404 page styling #324
Conversation
…ering Card styling
Looks very nice overall. I wonder if it would be worth extracting a function that generates the Card component from an object containing the title, body text, link text, and link path? const cards = [
{
title: 'About',
bodyText: 'Access links containing further information about Cryostat',
linkText: 'View information about Cryostat',
linkPath: '/about',
},
];
return (<>
(
cards.map(card =>
<Card className='pf-c-card-not-found'>
<CardTitle>{card.title}</CardTitle>
<CardBody>{card.bodyText}</CardBody>
<CardFooter className='pf-c-card-not-found__footer'>
<Link to={card.linkPath}>{card.linkText}</Link>
</CardFooter>
</Card>
)
)
</>); This would be wrapped inside the rest of the EmptyState component stuff that is already there. Alternatively, instead of just a generating function like this, you could extract out the card to its own component definition for even cleaner reuse. |
Sounds good, I'll look into the different extraction options. |
Updates the 404 page to follow the conventions laid out by PatternFly: https://www.patternfly.org/v4/ux-writing/http-404-pages/. I chose not to include the search function or Card header images for simplicity's sake but can try adding those as well if requested.
Fixes #295
Sample: