Skip to content

Conversation

@InsaneZein
Copy link
Collaborator

@InsaneZein InsaneZein commented Jul 18, 2024

RHCLOUD-31482 Adds Service Card component

image

@patternfly-build
Copy link

patternfly-build commented Jul 18, 2024

@InsaneZein InsaneZein marked this pull request as ready for review July 24, 2024 20:06
@InsaneZein InsaneZein requested review from dlabaj and fhlavac July 30, 2024 18:52
Comment on lines 14 to 28
A **Service Card** component allows

## Examples

### Service Card

```js file="./ServiceCardExample.tsx"

```

### Service Card with Gallery example

```js file="./ServiceCardGalleryExample.tsx"

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@InsaneZein can you please add some texts to the docs? It would also be nice to create an example with the custom footer. Let me know if you need help with the texts.

description='This is a basic ServiceCard Example'
icon={<img src={contentHeaderIcon} alt="content-header-icon" />}
showDisabledButton={false}
helperText=''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would either provide some text or remove the prop from this example


const useStyles = createUseStyles({
card: {
height: ('var(--pf-v5-u-h-100)')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
height: ('var(--pf-v5-u-h-100)')
height: 'var(--pf-v5-u-h-100)'

height: ('var(--pf-v5-u-h-100)')
},
image: {
marginRight: ('var(--pf-v5-global--spacer--md)'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
marginRight: ('var(--pf-v5-global--spacer--md)'),
marginRight: 'var(--pf-v5-global--spacer--md)',

width: 48
},
launchButton: {
marginRight: ('var(--pf-v5-global--spacer--sm)')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
marginRight: ('var(--pf-v5-global--spacer--sm)')
marginRight: 'var(--pf-v5-global--spacer--md)'

I think this one should be md

Copy link
Contributor

@fhlavac fhlavac Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add icons to these cards and show a helper text in one of the cards? Just to show the features.

For the footers we could hardcode the default one in the example and another with something like this

<Button variant="link" isInline>
            Learn more  
          <Icon className="pf-u-ml-sm" isInline>
            <ArrowRightIcon />
          </Icon>
</Button>

(another already known use case of this component)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should preferably use cypress

@fhlavac
Copy link
Contributor

fhlavac commented Jul 31, 2024

@InsaneZein thank you! Overall looks good. Just some minor comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants