Skip to content

Commit 5d85733

Browse files
colebemisrezrah
authored andcommitted
Export PageLayout from main bundle (#1882)
* Export PageLayout from main bundle * Create odd-apes-guess.md * Add PageLayout to sidenav * Update .changeset/odd-apes-guess.md Co-authored-by: Rez <rezrah@github.com> * Update PageLayout docs Co-authored-by: Rez <rezrah@github.com>
1 parent 3999b47 commit 5d85733

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
lines changed

.changeset/odd-apes-guess.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@primer/react": major
3+
---
4+
5+
`PageLayout` is being graduated from the `drafts` bundle to the `main` bundle.
6+
7+
To upgrade, rewrite your imports accordingly:
8+
9+
```diff
10+
- import {PageLayout} from '@primer/react/drafts'
11+
+ import {PageLayout} from '@primer/react'
12+
```

docs/content/drafts/PageLayout.mdx renamed to docs/content/PageLayout.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ storybook: https://primer.style/react/storybook?path=/story/layout-pagelayout--p
77
---
88

99
```js
10-
import {PageLayout} from '@primer/react/drafts'
10+
import {PageLayout} from '@primer/react'
1111
```
1212

1313
## Examples
@@ -20,7 +20,7 @@ See [storybook](https://primer.style/react/storybook?path=/story/layout-pagelayo
2020

2121
### Default
2222

23-
```jsx live drafts
23+
```jsx live
2424
<PageLayout>
2525
<PageLayout.Header>
2626
<Placeholder label="Header" height={64} />
@@ -39,7 +39,7 @@ See [storybook](https://primer.style/react/storybook?path=/story/layout-pagelayo
3939

4040
### With dividers
4141

42-
```jsx live drafts
42+
```jsx live
4343
<PageLayout>
4444
<PageLayout.Header divider="line">
4545
<Placeholder label="Header" height={64} />
@@ -58,7 +58,7 @@ See [storybook](https://primer.style/react/storybook?path=/story/layout-pagelayo
5858

5959
### With pane on left
6060

61-
```jsx live drafts
61+
```jsx live
6262
<PageLayout>
6363
<PageLayout.Header>
6464
<Placeholder label="Header" height={64} />
@@ -77,7 +77,7 @@ See [storybook](https://primer.style/react/storybook?path=/story/layout-pagelayo
7777

7878
### With condensed spacing
7979

80-
```jsx live drafts
80+
```jsx live
8181
<PageLayout padding="condensed" rowGap="condensed" columnGap="condensed">
8282
<PageLayout.Header>
8383
<Placeholder label="Header" height={64} />
@@ -96,7 +96,7 @@ See [storybook](https://primer.style/react/storybook?path=/story/layout-pagelayo
9696

9797
### Without header or footer
9898

99-
```jsx live drafts
99+
```jsx live
100100
<PageLayout>
101101
<PageLayout.Content>
102102
<Placeholder label="Content" height={240} />

docs/src/@primer/gatsby-theme-doctocat/nav.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
url: /Overlay
8888
- title: Pagehead
8989
url: /Pagehead
90+
- title: PageLayout
91+
url: /PageLayout
9092
- title: Pagination
9193
url: /Pagination
9294
- title: PointerBox

src/drafts/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ export * from '../Button2'
1111
export * from '../ActionMenu2'
1212
export * from '../DropdownMenu2'
1313
export * from '../Label2'
14-
export * from '../PageLayout'

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ export type {ThemeProviderProps} from './ThemeProvider'
88
// Layout
99
export {default as Box} from './Box'
1010
export type {BoxProps} from './Box'
11+
export {PageLayout} from './PageLayout'
12+
export type {
13+
PageLayoutProps,
14+
PageLayoutHeaderProps,
15+
PageLayoutContentProps,
16+
PageLayoutPaneProps,
17+
PageLayoutFooterProps
18+
} from './PageLayout'
1119

1220
// Hooks
1321
export {default as useDetails} from './hooks/useDetails'

0 commit comments

Comments
 (0)