Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ src
### Component's API rules:
- prop names comply with PatternFly components naming standards (`variant`, `onClick`, `position`, etc.)
- the API is maximally simplified and all props are provided with a description
- it is build on the top of existing PatternFly types without prop omitting
- it is built on the top of existing PatternFly types without prop omitting
- it is well documented using the PatternFly documentation (`/packages/module/patternfly-docs/content/extensions/component-groups/examples/MyComponent/MyComponent.md`) with examples of all possible use cases (`packages/module/patternfly-docs/content/extensions/component-groups/examples/MyComponent/MyComponent[...]Example.tsx`)
- do not unnecessarily use external libraries in your component - rather, delegate the necessary logic to the component's user using the component's API

Expand Down
6 changes: 3 additions & 3 deletions cypress/component/MultiContentCard.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const MultiContentCardExample: React.FunctionComponent = () => {
const cards = [
<Card isFullHeight isPlain key="card-1">
<CardHeader>
<Content component={ContentVariants.h3}>Getting Started</Content>
<Content component={ContentVariants.h4}>Getting Started</Content>
</CardHeader>
<CardBody>
<Content className={clsx(classes.action, 'pf-v6-u-font-weight-bold', 'pf-v6-u-mb-sm')}>
Expand Down Expand Up @@ -49,7 +49,7 @@ export const MultiContentCardExample: React.FunctionComponent = () => {
</CardFooter>
</Card>,
<Card isFullHeight isPlain key="card-2">
<CardBody className="pf-v6-u-pt-3xl-on-md">
<CardBody>
<Content className={clsx(classes.action, 'pf-v6-u-font-weight-bold', 'pf-v6-u-mb-sm')}>
<Icon size="md" className="pf-v6-u-pl-sm pf-v6-u-pr-md">
<LockIcon />
Expand All @@ -73,7 +73,7 @@ export const MultiContentCardExample: React.FunctionComponent = () => {
</Card>,
<Card isFullHeight isPlain key="card-3">
<CardHeader>
<Content component={ContentVariants.h3}>Next Steps</Content>
<Content component={ContentVariants.h4}>Next Steps</Content>
</CardHeader>
<CardBody>
<Content className={clsx(classes.action, 'pf-v6-u-font-weight-bold', 'pf-v6-u-mb-sm')}>
Expand Down
48 changes: 48 additions & 0 deletions cypress/component/ServiceCard.cy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';
import ServiceCard from '../../packages/module/dist/dynamic/ServiceCard';
import { Button, ButtonVariant } from '@patternfly/react-core';

describe('ServiceCard', () => {
it('renders ServiceCard', () => {
cy.mount(
<ServiceCard
title='Example'
subtitle='A basic example'
description='This is a basic ServiceCard Example'
icon={<img src="/" alt="content-header-icon" />}
helperText='Here is helper text'
ouiaId='Example'
/>)
cy.get('[data-ouia-component-id="Example-card"]').should('exist');
});
it('renders custom footer', () => {
cy.mount(
<ServiceCard
title='Example'
subtitle='A basic example'
description='This is a basic ServiceCard Example'
icon={<img src="/" alt="content-header-icon" />}
helperText='Here is helper text'
ouiaId='Example'
footer={<>
<Button
variant={ButtonVariant.secondary}
isInline
className='pf-v5-u-pr-md'
component="a"
href='www.google.com'>
Launch
</Button>
<Button
variant={ButtonVariant.link}
component="a"
isInline
href='www.google.com'
>
Learn More
</Button></>
}
/>)
cy.get('[data-ouia-component-id="Example-footer"]').should('exist');
})
});
Loading