-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add logo group object * Update changelog * Update margin to remove extra white space around logos * Update pattern structure * Update logo alt text * Update prototype with logo-group * Update size token * Update comments in stories Co-authored-by: Gerardo Rodriguez <[email protected]> * Update story code Co-authored-by: Gerardo Rodriguez <[email protected]> * Remove negative margins * Update margin and comment Co-authored-by: Gerardo Rodriguez <[email protected]>
- Loading branch information
1 parent
0974e3f
commit 3c102fa
Showing
9 changed files
with
113 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@cloudfour/patterns': minor | ||
--- | ||
|
||
Add Logo Group object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% embed '@cloudfour/objects/container/container.twig' %} | ||
{% block content %} | ||
{% embed '@cloudfour/objects/logo-group/logo-group.twig' %} | ||
{% block content %} | ||
{% for item in items %} | ||
<img src="{{ item.src }}" alt="{{ item.alt }}"> | ||
{% endfor %} | ||
{% endblock %} | ||
{% endembed %} | ||
{% endblock %} | ||
{% endembed %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"alt": "Walmart", | ||
"src": "media/client-logos/logo-walmart.svg" | ||
}, | ||
{ | ||
"alt": "Deschutes Brewery", | ||
"src": "media/client-logos/logo-deschutes.svg" | ||
}, | ||
{ | ||
"alt": "Obama '08", | ||
"src": "media/client-logos/logo-obama.svg" | ||
}, | ||
{ | ||
"alt": "Treasure Coast Hospice", | ||
"src": "media/client-logos/logo-treasurecoast.svg" | ||
}, | ||
{ | ||
"alt": "Entertainment", | ||
"src": "media/client-logos/logo-entertainment.svg" | ||
}, | ||
{ | ||
"alt": "Hautelook", | ||
"src": "media/client-logos/logo-hautelook.svg" | ||
}, | ||
{ | ||
"alt": "Ceasefire Oregon", | ||
"src": "media/client-logos/logo-ceasefire.svg" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@use "../../compiled/tokens/scss/size"; | ||
@use '../../mixins/ms'; | ||
|
||
.o-logo-group { | ||
align-items: center; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
} | ||
|
||
/** | ||
* 1. Because there is generous spacing between the logos, we added a lot of | ||
* white space around Logo Group to help balance the pattern visually. | ||
* Including the spacing as part of the pattern means we don't need to rely | ||
* on utilities. | ||
*/ | ||
|
||
.o-logo-group > * { | ||
margin: size.$spacing-gap-logo-group; /* 1 */ | ||
width: size.$width-logo-group-item-width; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Story, Canvas, Meta } from '@storybook/addon-docs/blocks'; | ||
// The '!!raw-loader!' syntax is a non-standard, Webpack-specific, syntax. | ||
// See: https://github.com/webpack-contrib/raw-loader#examples | ||
// For now, it seems likely Storybook is pretty tied to Webpack, therefore, we are | ||
// okay with the following Webpack-specific raw loader syntax. It's better to leave | ||
// the ESLint rule enabled globally, and only thoughtfully disable as needed (e.g. | ||
// within a Storybook docs page and not within an actual component). | ||
// This can be revisited in the future if Storybook no longer relies on Webpack. | ||
// eslint-disable-next-line @cloudfour/import/no-webpack-loader-syntax | ||
import defaultDemoSource from '!!raw-loader!./demo/demo.twig'; | ||
import defaultDemo from './demo/demo.twig'; | ||
import logos from './demo/logos.json'; | ||
|
||
<Meta title="Objects/Logo Group" /> | ||
|
||
# Logo Group | ||
|
||
Logo Group can be used to display a group of client logos. Logos break onto multiple lines depending on the available space and are vertically centered. | ||
|
||
<Canvas> | ||
<Story | ||
name="Default" | ||
parameters={{ docs: { source: { code: defaultDemoSource } } }} | ||
> | ||
{defaultDemo({ items: logos })} | ||
</Story> | ||
</Canvas> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="o-logo-group"> | ||
{% block content %}{% endblock %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters