Skip to content

Commit

Permalink
fixup! Feat(web-react): Introduce UNSTABLE_PartnerLogo component #DS-…
Browse files Browse the repository at this point in the history
…1357
  • Loading branch information
curdaj committed Jul 3, 2024
1 parent 5d25af9 commit 0405122
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions packages/web-react/src/components/UNSTABLE_PartnerLogo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PartnerLogo is a component designed to display the partner's logo (e.g. advertis
```jsx
import { UNSTABLE_PartnerLogo } from '@lmc-eu/spirit-web-react';

<UNSTABLE_PartnerLogo>
<UNSTABLE_PartnerLogo aria-label="Logo of the partner">
<!-- Logo go here -->
</UNSTABLE_PartnerLogo>
```
Expand All @@ -18,17 +18,45 @@ import { UNSTABLE_PartnerLogo } from '@lmc-eu/spirit-web-react';
The PartnerLogo component is available in [sizes][dictionary-size].

```jsx
<UNSTABLE_PartnerLogo size="small">
<UNSTABLE_PartnerLogo size="small" aria-label="Logo of the partner">
<!-- Logo go here -->
</UNSTABLE_PartnerLogo>
<UNSTABLE_PartnerLogo size="small">
<UNSTABLE_PartnerLogo size="small" aria-label="Logo of the partner">
<!-- Logo go here -->
</UNSTABLE_PartnerLogo>
<UNSTABLE_PartnerLogo size="small">
<UNSTABLE_PartnerLogo size="small" aria-label="Logo of the partner">
<!-- Logo go here -->
</UNSTABLE_PartnerLogo>
```

## Content

The content of the PartnerLogo component can be an image or svg.

### Image

```jsx
<UNSTABLE_PartnerLogo aria-label="Logo of the partner">
<img src="path-to-logo" alt="Partner Logo" aria-hidden="true" />
</UNSTABLE_PartnerLogo>
```

ℹ️ Don't forget to add the `aria-label` attribute for accessible title.
The image should have an `alt` attribute set and can be aria-hidden, because the `aria-label`
attribute is set on the container.

### SVG

```jsx
<UNSTABLE_PartnerLogo aria-label="Logo of the partner">
<svg width="300" height="130">
<rect width="200" height="100" x="10" y="10" rx="20" ry="20" fill="#fff" />
</svg>
</UNSTABLE_PartnerLogo>
```

ℹ️ Don't forget to add the `aria-label` attribute for accessible title.

## API

| Name | Type | Default | Required | Description |
Expand Down

0 comments on commit 0405122

Please sign in to comment.