Skip to content

Commit

Permalink
refactor(web): allow not justified Page.Actions
Browse files Browse the repository at this point in the history
Made adjustments to support an acceptable layout for actions on the
product selection page. This change is expected to be temporary until
the migration to PatternFly 6 is completed, at which point the entire
page will be revamped.
  • Loading branch information
dgdavid committed Jan 17, 2025
1 parent 4330e12 commit 11e6800
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/src/components/core/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ const Section = ({
* </Page.Actions>
*
*/
const Actions = ({ children }: React.PropsWithChildren) => {
const Actions = ({
children,
justifyContent = "default",
}: React.PropsWithChildren<{ justifyContent?: "default" | "none" }>) => {
return (
<PageGroup
role="contentinfo"
Expand All @@ -199,7 +202,10 @@ const Actions = ({ children }: React.PropsWithChildren) => {
className={flexStyles.flexGrow_0}
>
<PageSection variant="light" component="div">
<Flex justifyContent="justifyContentFlexEnd">{children}</Flex>
{justifyContent === "none" && children}
{justifyContent === "default" && (
<Flex justifyContent="justifyContentFlexEnd">{children}</Flex>
)}
</PageSection>
</PageGroup>
);
Expand Down

0 comments on commit 11e6800

Please sign in to comment.