Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 69 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"clean": "rimraf dist",
"docs:develop": "pf-docs-framework start",
"docs:build": "pf-docs-framework build all --output public",
"docs:serve": "pf-docs-framework serve public --port 5000",
"docs:screenshots": "pf-docs-framework screenshots --urlPrefix http://localhost:5000",
"docs:serve": "pf-docs-framework serve public --port 5001",
"docs:screenshots": "pf-docs-framework screenshots --urlPrefix http://localhost:5001",
"test:a11y": "patternfly-a11y --config patternfly-a11y.config",
"serve:a11y": "serve coverage"
},
Expand All @@ -31,6 +31,7 @@
},
"dependencies": {
"@patternfly/react-core": "^4.250.1",
"@patternfly/react-icons": "^4.93.6",
"react-jss": "^10.9.2"
},
"peerDependencies": {
Expand All @@ -47,10 +48,13 @@
"@redhat-cloud-services/frontend-components-utilities": "^3.2.25",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-router-dom": "^5.3.3",
"classnames": "^2.2.5",
"copyfiles": "^2.4.1",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"rimraf": "^2.6.2",
"typescript": "^4.9.5"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/module/patternfly-a11y.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const urls = Object.keys(fullscreenRoutes)
.reduce((result, item) => (result.includes(item) ? result : [ ...result, item ]), []);

module.exports = {
prefix: 'http://localhost:5000',
prefix: 'http://localhost:5001',
waitFor,
crawl: false,
urls: [ ...urls ],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { ActionButtons } from '@patternfly/react-component-groups';

export const BasicExample: React.FunctionComponent = () => (
<ActionButtons
actionButtons={[
{
children: 'Primary action',
// eslint-disable-next-line no-console
onClick: () => {console.log('Primary action clicked')},
tooltip: 'Click me!',
},
{
children: 'Secondary action',
// eslint-disable-next-line no-console
onClick: () => {console.log('Secondary action clicked')},
variant: 'secondary',
},
]}
/>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { ActionMenu } from '@patternfly/react-component-groups';

export const BasicExample: React.FC = () => (
<ActionMenu
actions={[
{
children: 'Edit resource',
itemID: 'action-menu-example-1',
cta: {
// eslint-disable-next-line no-console
callback: () => console.log('Edit resource clicked'),
},
},
{
children: 'Delete resource',
itemID: 'action-menu-example-2',
cta: {
// eslint-disable-next-line no-console
callback: () => console.log('Delete resource clicked'),
},
isDisabled: true,
},
]}
id='action-menu-example'
/>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from 'react';
import { ActionMenu } from '@patternfly/react-component-groups';

export const BasicExample: React.FunctionComponent = () => (
<ActionMenu
groupedActions={[
{
groupId: 'group1',
groupActions: [
{
children: 'Edit resource',
itemID: 'action-menu-grouped-group-1-example-1',
cta: {
// eslint-disable-next-line no-console
callback: () => console.log('Edit resource clicked'),
},
},
{
children: 'Delete resource',
itemID: 'action-menu-grouped-group-1-example-2',
cta: {
// eslint-disable-next-line no-console
callback: () => console.log('Delete resource clicked'),
},
isDisabled: true,
},
],
},
{
groupId: 'group2',
label: 'Links',
groupActions: [
{
children: 'GitHub',
itemID: 'action-menu-grouped-group-2-example-1',
cta: {
href: 'https://github.com/',
external: true,
},
},
{
children: 'Link',
itemID: 'action-menu-grouped-group-2-example-2',
cta: {
href: '/#',
},
description: 'Description of link',
},
],
},
]}
displayLabelBeforeIcon
id='action-menu-grouped-example'
/>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import { Breadcrumbs } from '@patternfly/react-component-groups';

export const BasicExample: React.FunctionComponent = () => (
<Router>
<Breadcrumbs
breadcrumbs={[
{ children: 'Resources', to: '/resources' },
{ children: 'Resource details', to: '/resources/example-resource' },
]}
/>
</Router>
);
Loading