Skip to content

Commit 7fd6d37

Browse files
committed
Merge branch 'master' into pr/867
2 parents e4b6b38 + 6607f33 commit 7fd6d37

File tree

125 files changed

+19637
-6504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+19637
-6504
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ _site
99
dist/
1010
node_modules/
1111
searchIndex.js
12+
.cache/
13+
public/

docs/DetailsDialog.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/PackageHeader.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

docs/StatusLabel.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/components.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/constants.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

pages/css/components/alerts.md renamed to docs/content/components/alerts.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,33 @@ source: 'https://github.com/primer/css/tree/master/src/alerts'
66
bundle: alerts
77
---
88

9-
109
Flash messages, or alerts, inform users of successful or pending actions. Use them sparingly. Don't show more than one at a time.
1110

1211
## Default
1312

1413
Flash messages start off looking decently neutral—they're just light blue rounded rectangles.
1514

16-
```html
15+
```html live
1716
<div class="flash">
1817
Flash message goes here.
1918
</div>
2019
```
2120

2221
You can put multiple paragraphs of text in a flash message—the last paragraph's bottom `margin` will be automatically override.
2322

24-
```html
23+
```html live
2524
<div class="flash">
26-
<p>This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more text, it'll eventually wrap to a new line.</p>
25+
<p>
26+
This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more
27+
text, it'll eventually wrap to a new line.
28+
</p>
2729
<p>And this is another paragraph.</p>
2830
</div>
2931
```
3032

31-
Should the need arise, you can quickly space out your flash message from surrounding content with a `.flash-messages` wrapper. *Note the extra top and bottom margin in the example below.*
33+
Should the need arise, you can quickly space out your flash message from surrounding content with a `.flash-messages` wrapper. _Note the extra top and bottom margin in the example below._
3234

33-
```html
35+
```html live
3436
<div class="flash-messages">
3537
<div class="flash">
3638
Flash message goes here.
@@ -42,19 +44,19 @@ Should the need arise, you can quickly space out your flash message from surroun
4244

4345
Add `.flash-warn`, `.flash-error`, or `.flash-success` to the flash message to make it yellow, red, or green, respectively.
4446

45-
```html
47+
```html live
4648
<div class="flash flash-warn">
4749
Flash message goes here.
4850
</div>
4951
```
5052

51-
```html
53+
```html live
5254
<div class="flash flash-error">
5355
Flash message goes here.
5456
</div>
5557
```
5658

57-
```html
59+
```html live
5860
<div class="flash flash-success">
5961
Flash message goes here.
6062
</div>
@@ -64,9 +66,15 @@ Add `.flash-warn`, `.flash-error`, or `.flash-success` to the flash message to m
6466

6567
Add an icon to the left of the flash message to give it some funky fresh attention.
6668

67-
```erb
69+
```html live
6870
<div class="flash">
69-
<%= octicon "alert" %>
71+
<!-- <%= octicon "alert" %> -->
72+
<svg width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-alert mr-2" aria-hidden="true">
73+
<path
74+
fill-rule="evenodd"
75+
d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"
76+
/>
77+
</svg>
7078
Flash message with an icon goes here.
7179
</div>
7280
```
@@ -75,9 +83,17 @@ Add an icon to the left of the flash message to give it some funky fresh attenti
7583

7684
Add a JavaScript enabled (via Crema) dismiss (close) icon on the right of any flash message.
7785

78-
```erb
86+
```html live
7987
<div class="flash">
80-
<button class="flash-close js-flash-close" type="button"><%= octicon "x", :"aria-label" => "Close" %></button>
88+
<button class="flash-close js-flash-close" type="button">
89+
<!-- <%= octicon "x", :"aria-label" => "Close" %> -->
90+
<svg width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-x" aria-label="Close" role="img">
91+
<path
92+
fill-rule="evenodd"
93+
d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"
94+
/>
95+
</svg>
96+
</button>
8197
Dismissable flash message goes here.
8298
</div>
8399
```
@@ -86,7 +102,7 @@ Add a JavaScript enabled (via Crema) dismiss (close) icon on the right of any fl
86102

87103
A flash message with an action button.
88104

89-
```html
105+
```html live
90106
<div class="flash">
91107
<button type="submit" class="btn btn-sm primary flash-action">Complete action</button>
92108
Flash message with action here.
@@ -97,11 +113,10 @@ A flash message with an action button.
97113

98114
A flash message that is full width and removes border and border radius.
99115

100-
```html
116+
```html live
101117
<div class="flash flash-full">
102118
<div class="container">
103119
Full width flash message.
104120
</div>
105121
</div>
106122
```
107-

0 commit comments

Comments
 (0)