Skip to content

Commit

Permalink
[Component] Create o-text-introduction + update docs to reflect updat…
Browse files Browse the repository at this point in the history
…ed spacing
  • Loading branch information
meissadia committed Oct 19, 2023
1 parent f0ef4a2 commit 0d963aa
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
Binary file added docs/images/uploads/text_introduction-spacing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/uploads/text_introduction.png
Binary file not shown.
34 changes: 23 additions & 11 deletions docs/pages/introductions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,40 @@ layout: variation
section: patterns
variation_groups:
- variations:
- variation_code_snippet: ""
- variation_code_snippet: >-
<div class="o-text-introduction">
<h1>Text introduction</h1>
<p class="lead-paragraph">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore.
</p>
<ul class="m-list m-list__links">
<li class="m-list_item">
<a class="m-list_link" href="#"> Call-to-action link </a>
</li>
</ul>
</div>
variation_description: >-
Text introductions consist of a heading, lead paragraph, and optional
descriptive paragraph, and link text. They should be used on every
page except in cases when a
[hero](https://cfpb.github.io/design-system/patterns/heroes) or [item
introduction](https://cfpb.github.io/design-system/patterns/item-introductions)
is used.
Layout as seen with a standard right sidebar:
![Image of a text introduction component with a standard right sidebar](/design-system/images/uploads/text_introduction.png)
variation_jinja_code_snippet: ""
variation_name: Text introduction
variation_specs: >-
![Image of text intro showing desktop and mobile design specs](/design-system/images/uploads/text_introduction-spacing.png)
![Image of text intro showing grid and design specs](/design-system/images/uploads/text_introduction_with_specs.png)
* Spacing: 45px margin above, 60 px margin below.
* Page title: Heading 1
Expand Down
1 change: 1 addition & 0 deletions packages/cfpb-layout/src/cfpb-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import (less) 'organisms/featured-content-module.less';
@import (less) 'organisms/wells.less';
@import (less) 'organisms/email-signup.less';
@import (less) 'organisms/text-introduction.less';

/* ==========================================================================
Design System
Expand Down
10 changes: 10 additions & 0 deletions packages/cfpb-layout/src/organisms/text-introduction.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.o-text-introduction {
margin-top: 0; // Top spacing should come from the layout container
margin-bottom: 60px;

// All direct children should be 15px apart
& > * {
margin-top: 0;
margin-bottom: 15px;
}
}

0 comments on commit 0d963aa

Please sign in to comment.