Skip to content

Commit 645f630

Browse files
authored
Merge pull request #939 from primer/box-overlay-example
Fix Box--overlay example
2 parents dacbd10 + 84e391a commit 645f630

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/content/components/box-overlay.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Use the `Box--overlay` with the `<details>` and [`<details-dialog>`](https://git
1212

1313
Box overlays come in three widths. The default `Box--overlay` is 440px wide, `Box-overlay--narrow` is 320px wide, and `Box-overlay--wide` is 640px wide.
1414

15-
**Note:** `position: fixed` has been disabled in this example
15+
```html live
1616

17-
```erb
1817
<details class="details-reset details-overlay details-overlay-dark">
1918
<summary class="btn" aria-haspopup="dialog">Open dialog</summary>
2019
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast">
2120
<div class="Box-header">
2221
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog>
23-
<%= octicon "x" %>
22+
<!-- <%= octicon "x" %> -->
23+
<svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" 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"></path></svg>
2424
</button>
2525
<h3 class="Box-title">Box title</h3>
2626
</div>
@@ -50,6 +50,10 @@ Box overlays come in three widths. The default `Box--overlay` is 440px wide, `Bo
5050
</div>
5151
</details-dialog>
5252
</details>
53+
54+
<!-- Temporary overrides (don't use in production) -->
55+
<style> .frame-example { min-height: 500px; } </style>
56+
<link href="https://unpkg.com/@github/details-dialog-element/index.css" rel="stylesheet" />
5357
```
5458

5559
In github.com there is a shared dialog partial. You will only have to pass in the modal content:

docs/src/@primer/gatsby-theme-doctocat/components/live-preview-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function LivePreviewWrapper({children}) {
77
<Frame>
88
<link rel="stylesheet" href="https://github.com/site/assets/styleguide.css" />
99
<style>{primerStyles}</style>
10-
<div className="p-3">{children}</div>
10+
<div className="frame-example p-3">{children}</div>
1111
</Frame>
1212
)
1313
}

0 commit comments

Comments
 (0)