Skip to content

Commit 34e7aa8

Browse files
authored
Apply opinionated defaults to LogoSuite (#691)
* add default variant to LogoSuite * reduce LogoSuite size on mobile viewports * update LogoSuite stories * document LogoSuite changes * add changeset * update snapshots * github-actions[bot] Regenerated snapshots * update snapshots * update logosuite tokens * update logosuite tokens * remove unnecessary css * snapshots * nuke snapshots * re-add snapshots * remove LogoSuite default variant * update changeset * update docs * update docs * update docs default example * snapshots * add test for auto variant behaviour * update changeset --------- Co-authored-by: joshfarrant <[email protected]>
1 parent 3fdff8c commit 34e7aa8

File tree

40 files changed

+699
-560
lines changed

40 files changed

+699
-560
lines changed

.changeset/silent-scissors-suffer.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@primer/brand-primitives': minor
3+
'@primer/react-brand': minor
4+
---
5+
6+
> **Warning**
7+
> This update contains a breaking visual change to the `LogoSuite` component. `LogoSuite` components without a specified `variant` prop will now automatically apply either `emphasis` or `muted` styles depending on the number of logos in the `LogoBar`.
8+
9+
- Added new default behaviour to the `variant` prop of the `LogoSuite` component. If `variant` is `undefined` then either `emphasis` or `muted` styles are automatically applied depending on the number of logos in the `LogoBar`. Five or fewer logos apply the `emphasis` style, while six or more use the `muted` style.
10+
- Reduced `LogoSuite` size on mobile viewports.

apps/docs/content/components/LogoSuite/index.mdx

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Logo suite
33
description: Use a logo suite to present a list logos, such as sponsors or vendors.
44
---
55

6-
import CustomVideoPlayer from '../../../src/components/custom-video-player'
76
import ComponentLayout from '../../../src/layouts/component-layout'
87
export default ComponentLayout
98

@@ -22,7 +21,7 @@ Use the logo suite component to showcase a list of logos, such as for clients, s
2221

2322
A logo suite is intended to build credibility, trust, and provide social proof by displaying consistent logos.
2423

25-
Logo suite should be used for groups of logos more than 4 and less than 12. In scenarios hoping to showcase more than 12 logos, considering stacking two components together. To create the best visual consistency and balance, rearrange and resize the logos when necessary to create similar area distribution and attention to each of the logos.
24+
Logo suite should be used for groups of logos more than 4 and less than 12. To create the best visual consistency and balance, rearrange and resize the logos when necessary to create similar area distribution and attention to each of the logos.
2625

2726
### Arrangement
2827

@@ -50,31 +49,6 @@ Logo suite should be used for groups of logos more than 4 and less than 12. In s
5049
</Dont>
5150
</DoDontContainer>
5251

53-
### Contextual information
54-
55-
<DoDontContainer stacked>
56-
<Do>
57-
<img
58-
src="https://github.com/primer/brand/assets/131988618/79680b75-9e3b-4eb1-9371-2d8ee45a6dc1"
59-
alt=""
60-
/>
61-
<Caption>
62-
Do publish the logo suite with context. Introduce the logos and, when
63-
applicable, share how the logos have been grouped together.
64-
</Caption>
65-
</Do>
66-
<Dont>
67-
<img
68-
src="https://github.com/primer/brand/assets/131988618/5ab14ace-9c9e-425f-8b5c-73de82340733"
69-
alt=""
70-
/>
71-
<Caption>
72-
Don’t use the logo suite without a heading/description. Consider turning
73-
off a visible description if needed.
74-
</Caption>
75-
</Dont>
76-
</DoDontContainer>
77-
7852
### Color uniformity
7953

8054
<DoDontContainer stacked>
@@ -107,9 +81,11 @@ Logo suite should be used for groups of logos more than 4 and less than 12. In s
10781
The logo suite offers three appearance options:
10882

10983
- `muted`: The muted option is suitable for displaying 6+ logos and displays logos in a `secondary` color. It allows for two rows of logos, maintaining a clean and organized appearance.
110-
- `emphasis`: The emphasis option is designed for spotlighting ~5 logos in the `primary` color. It displays logos larger, drawing more attention to the logos.
84+
- `emphasis`: The emphasis option is designed for spotlighting 5 or fewer logos in the `primary` color. It displays logos larger, drawing more attention to the logos.
11185
- `marquee`: The marquee option provides a flowing logo animation and can accommodate up to 12 logos. It is ideal for scenarios with limited page real estate.
11286

87+
The `muted` and `emphasis` variants will automatically be applied if they are not specified. The `muted` variant will be applied if there are 6 or more logos, and the `emphasis` variant will be applied if there are 5 or fewer logos.
88+
11389
All three options on the logo bar contains an optional divider. This divider can serve as a visual separator. These three options can be used adjacently.
11490

11591
<div>
@@ -118,8 +94,8 @@ All three options on the logo bar contains an optional divider. This divider can
11894
alt=""
11995
/>
12096
<Caption>
121-
Use the default muted option when displaying 6-12 logos across two rows. 2
122-
rows (when using 6-12 logos).
97+
Use the muted option when displaying 6-12 logos across two rows. 2 rows
98+
(when using 6-12 logos).
12399
</Caption>
124100
</div>
125101

@@ -129,8 +105,8 @@ All three options on the logo bar contains an optional divider. This divider can
129105
alt=""
130106
/>
131107
<Caption>
132-
The emphasis option can be used to spotlight logos. It is best used with 6
133-
or less logos to create 1 row.
108+
The emphasis option can be used to spotlight logos. It is best used with 5
109+
or fewer logos to create 1 row.
134110
</Caption>
135111
</div>
136112

0 commit comments

Comments
 (0)