Skip to content

Commit f865222

Browse files
authored
Merge pull request #120 from nicolethoen/update_pf_version
chore: update pf versions and fix small issues
2 parents 2b21892 + 8faa6d8 commit f865222

File tree

6 files changed

+13914
-28
lines changed

6 files changed

+13914
-28
lines changed

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@
7979
"webpack-merge": "^5.8.0"
8080
},
8181
"dependencies": {
82-
"@patternfly/react-core": "^4.162.3",
83-
"@patternfly/react-icons": "^4.13.1",
84-
"@patternfly/react-styles": "^4.12.5",
82+
"@patternfly/react-core": "^4.181.1",
83+
"@patternfly/react-icons": "^4.32.1",
84+
"@patternfly/react-styles": "^4.31.1",
8585
"@storybook/builder-webpack5": "^6.2.9",
8686
"react": "^17.0.2",
8787
"react-dom": "^17.0.2",

src/app/AppLayout/AppLayout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const AppLayout: React.FunctionComponent<IAppLayout> = ({ children }) => {
2626
};
2727
const onNavToggle = () => {
2828
setIsNavOpen(!isNavOpen);
29-
}
29+
};
3030
const onPageResize = (props: { mobileView: boolean; windowSize: number }) => {
3131
setIsMobileView(props.mobileView);
3232
};
@@ -53,8 +53,8 @@ const AppLayout: React.FunctionComponent<IAppLayout> = ({ children }) => {
5353
const location = useLocation();
5454

5555
const renderNavItem = (route: IAppRoute, index: number) => (
56-
<NavItem key={`${route.label}-${index}`} id={`${route.label}-${index}`}>
57-
<NavLink exact={route.exact} to={route.path} activeClassName="pf-m-current">
56+
<NavItem key={`${route.label}-${index}`} id={`${route.label}-${index}`} isActive={route.path === location.pathname}>
57+
<NavLink exact={route.exact} to={route.path}>
5858
{route.label}
5959
</NavLink>
6060
</NavItem>
@@ -109,6 +109,6 @@ const AppLayout: React.FunctionComponent<IAppLayout> = ({ children }) => {
109109
{children}
110110
</Page>
111111
);
112-
}
112+
};
113113

114114
export { AppLayout };

src/app/Support/Support.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import {
88
EmptyStateVariant,
99
EmptyStateIcon,
1010
EmptyStateBody,
11-
EmptyStateSecondaryActions
11+
EmptyStateSecondaryActions,
12+
Text,
13+
TextContent,
14+
TextVariants
1215
} from '@patternfly/react-core';
1316

1417
export interface ISupportProps {
@@ -22,11 +25,18 @@ let Support: React.FunctionComponent<ISupportProps> = () => (
2225
<EmptyStateIcon icon={CubesIcon} />
2326
<Title headingLevel="h1" size="lg">
2427
Empty State (Stub Support Module)
25-
</Title>
28+
</Title>
2629
<EmptyStateBody>
27-
This represents an the empty state pattern in Patternfly 4. Hopefully it&apos;s simple enough to use but flexible
28-
enough to meet a variety of needs.
29-
</EmptyStateBody>
30+
<TextContent>
31+
<Text component="p">
32+
This represents an the empty state pattern in Patternfly 4. Hopefully it&apos;s simple enough to use but flexible
33+
enough to meet a variety of needs.
34+
</Text>
35+
<Text component={TextVariants.small}>
36+
This text has overridden a css component variable to demonstrate how to apply customizations using PatternFly's global variable API.
37+
</Text>
38+
</TextContent>
39+
</EmptyStateBody>
3040
<Button variant="primary">Primary Action</Button>
3141
<EmptyStateSecondaryActions>
3242
<Button variant="link">Multiple</Button>
@@ -38,6 +48,6 @@ let Support: React.FunctionComponent<ISupportProps> = () => (
3848
</EmptyStateSecondaryActions>
3949
</EmptyState>
4050
</PageSection>
41-
)
51+
);
4252

4353
export { Support };

src/app/app.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
html, body, #root {
22
height: 100%;
33
}
4+
5+
.pf-c-content {
6+
--pf-c-content--small--Color: red; /* changes all <small> color to red */
7+
--pf-c-content--blockquote--BorderLeftColor: purple; /* changes all <blockquote> left border color to purple */
8+
--pf-c-content--hr--BackgroundColor: lemonchiffon; /* changes a <hr> color to lemonchiffon */
9+
}

0 commit comments

Comments
 (0)