Skip to content

Commit b40be28

Browse files
authored
Merge pull request #40 from fhlavac/Ansible
Add Ansible component
2 parents 099cae0 + 72d1ed0 commit b40be28

File tree

21 files changed

+343
-38
lines changed

21 files changed

+343
-38
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# Sidenav top-level section
3+
# should be the same for all markdown files
4+
section: extensions
5+
subsection: Component groups
6+
# Sidenav secondary level section
7+
# should be the same for all markdown files
8+
id: Ansible
9+
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
10+
source: react
11+
# If you use typescript, the name of the interface to display props for
12+
# These are found through the sourceProps function provided in patternfly-docs.source.js
13+
propComponents: ['Ansible']
14+
---
15+
16+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
17+
18+
The **Ansible** component shows Ansible project logo.
19+
20+
To specify whether Ansible is supported or not, add the `unsupported` property to the `<Ansible>` component.
21+
22+
### Ansible supported
23+
24+
```js file="./AnsibleSupportedExample.tsx"
25+
26+
```
27+
28+
### Ansible unsupported
29+
30+
```js file="./AnsibleUnsupportedExample.tsx"
31+
32+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
3+
4+
export const BasicExample: React.FunctionComponent = () => (
5+
<Ansible />
6+
);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
3+
4+
export const BasicExample: React.FunctionComponent = () => (
5+
<Ansible unsupported />
6+
);
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import React from 'react';
22
import Battery from '@patternfly/react-component-groups/dist/dynamic/Battery';
33

4-
const BatteryCriticalExample: React.FunctionComponent = () => (
4+
export const BasicExample: React.FunctionComponent = () => (
55
<>
66
<Battery label="With prop: 4" severity={4} />
7-
<Battery className="pf-u-ml-md" label="With prop: critical" severity="critical" />
7+
<Battery className="pf-v5-u-ml-md" label="With prop: critical" severity="critical" />
88
</>
99
);
10-
11-
export default BatteryCriticalExample;
12-
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import React from 'react';
22
import Battery from '@patternfly/react-component-groups/dist/dynamic/Battery';
33

4-
const BatteryDefaultExample: React.FunctionComponent = () => <Battery label="Default" severity={'an unknown value' as any}/>
5-
6-
export default BatteryDefaultExample;
4+
export const BasicExample: React.FunctionComponent = () => <Battery label="Default" severity={'an unknown value' as any}/>
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from 'react';
22
import Battery from '@patternfly/react-component-groups/dist/dynamic/Battery';
33

4-
const BatteryHighExample: React.FunctionComponent = () => (
4+
export const BasicExample: React.FunctionComponent = () => (
55
<>
66
<Battery label="With prop: 3" severity={3} />
7-
<Battery className="pf-u-ml-md" label="With prop: high" severity="high" />
8-
<Battery className="pf-u-ml-md" label="With prop: error" severity="error" />
7+
<Battery className="pf-v5-u-ml-md" label="With prop: high" severity="high" />
8+
<Battery className="pf-v5-u-ml-md" label="With prop: error" severity="error" />
99
</>
1010
);
11-
12-
export default BatteryHighExample;
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from 'react';
22
import Battery from '@patternfly/react-component-groups/dist/dynamic/Battery';
33

4-
const BatteryLowExample: React.FunctionComponent = () => (
4+
export const BasicExample: React.FunctionComponent = () => (
55
<>
66
<Battery label="With prop: 1" severity={1} />
7-
<Battery className="pf-u-ml-md" label="With prop: low" severity="low" />
8-
<Battery className="pf-u-ml-md" label="With prop: info" severity="info" />
7+
<Battery className="pf-v5-u-ml-md" label="With prop: low" severity="low" />
8+
<Battery className="pf-v5-u-ml-md" label="With prop: info" severity="info" />
99
</>
1010
);
11-
12-
export default BatteryLowExample;
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from 'react';
22
import Battery from '@patternfly/react-component-groups/dist/dynamic/Battery';
33

4-
const BatteryMediumExample: React.FunctionComponent = () => (
4+
export const BasicExample: React.FunctionComponent = () => (
55
<>
66
<Battery label="With prop: 2" severity={2} />
7-
<Battery className="pf-u-ml-md" label="With prop: medium" severity="medium" />
8-
<Battery className="pf-u-ml-md" label="With prop: warn" severity="warn" />
7+
<Battery className="pf-v5-u-ml-md" label="With prop: medium" severity="medium" />
8+
<Battery className="pf-v5-u-ml-md" label="With prop: warn" severity="warn" />
99
</>
1010
);
11-
12-
export default BatteryMediumExample;

packages/module/patternfly-docs/content/extensions/component-groups/examples/DetailsPage/DetailsPage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ section: extensions
55
subsection: Component groups
66
# Sidenav secondary level section
77
# should be the same for all markdown files
8-
id: DetailsPage
8+
id: Details page
99
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
1010
source: react
1111
# If you use typescript, the name of the interface to display props for

packages/module/patternfly-docs/content/extensions/component-groups/examples/DetailsPage/DetailsPageExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export const BasicExample: React.FunctionComponent = () => (
5151
id: 'details-page-action-menu-example'
5252
}}
5353
tabs={[
54-
{ eventKey: 'details', title: 'Details', children: <div className="pf-u-m-md">Details content</div> },
55-
{ eventKey: 'other', title: 'Other', children: <div className="pf-u-m-md">Other content</div> }
54+
{ eventKey: 'details', title: 'Details', children: <div className="pf-v5-u-m-md">Details content</div> },
55+
{ eventKey: 'other', title: 'Other', children: <div className="pf-v5-u-m-md">Other content</div> }
5656
]}
5757
/>
5858
</Router>

0 commit comments

Comments
 (0)