Skip to content

Commit

Permalink
Merge pull request #4 from wise-king-sullyman/utilize-tertiary-nav
Browse files Browse the repository at this point in the history
feat(docs): utilize tertiary nav to organize docs
  • Loading branch information
wise-king-sullyman authored Dec 8, 2022
2 parents ae74518 + c4664a2 commit ee0eeca
Show file tree
Hide file tree
Showing 20 changed files with 1,376 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"react-dom": "^16.8 || ^17 || ^18"
},
"devDependencies": {
"@patternfly/documentation-framework": "^1.2.55",
"@patternfly/documentation-framework": "^1.3.0",
"@patternfly/react-table": "^4.111.4",
"@patternfly/react-code-editor": "^4.82.26",
"rimraf": "^2.6.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: Catalog view item header
id: Catalog item header
section: extensions
subsection: Catalog view
source: react
propComponents: ['CatalogItemHeader']
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: Catalog view tile
id: Catalog tile
section: extensions
subsection: Catalog view
source: react
propComponents: ['CatalogTile']
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: Catalog view filter side panel
id: Filter side panel
section: extensions
subsection: Catalog view
source: react
propComponents: ['FilterSidePanel', 'FilterSidePanelCategory', 'FilterSidePanelCategoryItem']
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: Catalog view properties side panel
id: Properties side panel
section: extensions
subsection: Catalog view
source: react
propComponents: ['PropertiesSidePanel', 'PropertyItem']
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: Catalog view vertical tabs
id: Vertical tabs
section: extensions
subsection: Catalog view
source: react
propComponents: ['VerticalTabs', 'VerticalTabsTab']
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import React from 'react';
import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
import { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';
import pfLogo2 from '../../../../content/examples/./pfLogo2.svg';
import '../../../../content/examples/./catalogItemHeader.css';
const pageData = {
"id": "Catalog view item header",
"section": "extensions",
"subsection": "Catalog item header",
"source": "react",
"slug": "/extensions/catalog-item-header/catalog-view-item-header/react",
"sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/module/patternfly-docs/content/examples/CatalogItemHeader.md",
"propComponents": [
{
"name": "CatalogItemHeader",
"description": "",
"props": [
{
"name": "className",
"type": "string",
"description": "Additional css classes",
"defaultValue": "''"
},
{
"name": "iconClass",
"type": "string",
"description": "Class for the image when an icon is to be used (exclusive from iconImg)",
"defaultValue": "null"
},
{
"name": "iconImg",
"type": "string",
"description": "URL of an image for the item's icon",
"defaultValue": "null"
},
{
"name": "title",
"type": "string | React.ReactNode",
"description": "Tile for the catalog item",
"required": true
},
{
"name": "vendor",
"type": "string | React.ReactNode",
"description": "Vendor for the catalog item",
"defaultValue": "null"
}
]
}
],
"examples": [
"Basic",
"With vendor description"
]
};
pageData.liveContext = {
CatalogItemHeader,
pfLogo2
};
pageData.relativeImports = {

};
pageData.examples = {
'Basic': props =>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';\nimport pfLogo2 from './examples/pfLogo2.svg';\n\nconst Basic = () => (\n <CatalogItemHeader\n iconImg={pfLogo2}\n title=\"PatternFly\"\n />\n)","title":"Basic","lang":"js"}}>

</Example>,
'With vendor description': props =>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';\nimport pfLogo2 from './examples/pfLogo2.svg';\n\nconst WithVendorDescription = () => (\n <CatalogItemHeader\n iconImg={pfLogo2}\n title=\"Patternfly-React\"\n vendor={\n <span>\n provided by <a href=\"http://redhat.com\">Red Hat</a>\n </span>\n }\n />\n)","title":"With vendor description","lang":"js"}}>

</Example>
};

const Component = () => (
<React.Fragment>
<AutoLinkHeader {...{"id":"introduction","size":"h2","className":"ws-title ws-h2"}}>
{`Introduction`}
</AutoLinkHeader>
<p {...{"className":"ws-p"}}>
{`Note: Catalog item header lives in its own package at `}
<PatternflyThemeLink {...{"to":"https://www.npmjs.com/package/@ausuliv/react-catalog-view-extension"}}>
<code {...{"className":"ws-code"}}>
{`@ausuliv/react-catalog-view-extension`}
</code>
</PatternflyThemeLink>
{`!`}
</p>
<p {...{"className":"ws-p"}}>
{`This package is currently an extension. Extension components do not undergo the same rigorous design or coding review process as core PatternFly components. If enough members of the community find them useful, we will work to move them into our core PatternFly system by starting the design process for the idea.`}
</p>
<AutoLinkHeader {...{"id":"examples","size":"h2","className":"ws-title ws-h2"}}>
{`Examples`}
</AutoLinkHeader>
{React.createElement(pageData.examples["Basic"])}
{React.createElement(pageData.examples["With vendor description"])}
</React.Fragment>
);
Component.displayName = 'ExtensionsCatalogItemHeaderCatalogViewItemHeaderReactDocs';
Component.pageData = pageData;

export default Component;
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import React from 'react';
import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
import { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';
import pfLogo2 from '../../../../content/examples/./pfLogo2.svg';
import '../../../../content/examples/./catalogItemHeader.css';
const pageData = {
"id": "Catalog view",
"section": "extensions",
"subsection": "Catalog item header",
"source": "react",
"slug": "/extensions/catalog-item-header/catalog-view/react",
"sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/module/patternfly-docs/content/examples/CatalogItemHeader.md",
"propComponents": [
{
"name": "CatalogItemHeader",
"description": "",
"props": [
{
"name": "className",
"type": "string",
"description": "Additional css classes",
"defaultValue": "''"
},
{
"name": "iconClass",
"type": "string",
"description": "Class for the image when an icon is to be used (exclusive from iconImg)",
"defaultValue": "null"
},
{
"name": "iconImg",
"type": "string",
"description": "URL of an image for the item's icon",
"defaultValue": "null"
},
{
"name": "title",
"type": "string | React.ReactNode",
"description": "Tile for the catalog item",
"required": true
},
{
"name": "vendor",
"type": "string | React.ReactNode",
"description": "Vendor for the catalog item",
"defaultValue": "null"
}
]
}
],
"examples": [
"Basic",
"With vendor description"
]
};
pageData.liveContext = {
CatalogItemHeader,
pfLogo2
};
pageData.relativeImports = {

};
pageData.examples = {
'Basic': props =>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';\nimport pfLogo2 from './examples/pfLogo2.svg';\n\nconst Basic = () => (\n <CatalogItemHeader\n iconImg={pfLogo2}\n title=\"PatternFly\"\n />\n)","title":"Basic","lang":"js"}}>

</Example>,
'With vendor description': props =>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { CatalogItemHeader } from '@ausuliv/react-catalog-view-extension';\nimport pfLogo2 from './examples/pfLogo2.svg';\n\nconst WithVendorDescription = () => (\n <CatalogItemHeader\n iconImg={pfLogo2}\n title=\"Patternfly-React\"\n vendor={\n <span>\n provided by <a href=\"http://redhat.com\">Red Hat</a>\n </span>\n }\n />\n)","title":"With vendor description","lang":"js"}}>

</Example>
};

const Component = () => (
<React.Fragment>
<AutoLinkHeader {...{"id":"introduction","size":"h2","className":"ws-title ws-h2"}}>
{`Introduction`}
</AutoLinkHeader>
<p {...{"className":"ws-p"}}>
{`Note: Catalog item header lives in its own package at `}
<PatternflyThemeLink {...{"to":"https://www.npmjs.com/package/@ausuliv/react-catalog-view-extension"}}>
<code {...{"className":"ws-code"}}>
{`@ausuliv/react-catalog-view-extension`}
</code>
</PatternflyThemeLink>
{`!`}
</p>
<p {...{"className":"ws-p"}}>
{`This package is currently an extension. Extension components do not undergo the same rigorous design or coding review process as core PatternFly components. If enough members of the community find them useful, we will work to move them into our core PatternFly system by starting the design process for the idea.`}
</p>
<AutoLinkHeader {...{"id":"examples","size":"h2","className":"ws-title ws-h2"}}>
{`Examples`}
</AutoLinkHeader>
{React.createElement(pageData.examples["Basic"])}
{React.createElement(pageData.examples["With vendor description"])}
</React.Fragment>
);
Component.displayName = 'ExtensionsCatalogItemHeaderCatalogViewReactDocs';
Component.pageData = pageData;

export default Component;
Loading

0 comments on commit ee0eeca

Please sign in to comment.