Skip to content

Commit e6687d9

Browse files
committed
Update docs from drafts to main
1 parent e835924 commit e6687d9

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

docs/content/Button.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,58 @@
22
componentId: button
33
title: Button
44
status: Alpha
5-
source: https://github.com/primer/react/tree/main/src/Button2
6-
storybook: '/react/storybook?path=/story/composite-components-button2'
5+
source: https://github.com/primer/react/tree/main/src/Button
6+
storybook: '/react/storybook?path=/story/composite-components-button'
77
description: Use button for the main actions on a page or form.
88
---
99

10-
import {Button, IconButton, LinkButton} from '@primer/react/drafts'
10+
import {Button, IconButton, LinkButton} from '@primer/react'
1111

1212
## Usage
1313

1414
### Installation
1515

1616
```js
17-
import {Button} from '@primer/react/drafts'
17+
import {Button} from '@primer/react'
1818
```
1919

2020
### Default button
2121

2222
This is the default variant for the `Button` component.
2323

24-
```jsx live drafts
24+
```jsx live
2525
<Button>Default</Button>
2626
```
2727

2828
### Danger button
2929

3030
The `danger` variant of `Button` is used to warn users about potentially destructive actions
3131

32-
```jsx live drafts
32+
```jsx live
3333
<Button variant="danger">Danger</Button>
3434
```
3535

3636
### Outline button
3737

3838
The `outline` variant of `Button` is typically used as a secondary button
3939

40-
```jsx live drafts
40+
```jsx live
4141
<Button variant="outline">Outline</Button>
4242
```
4343

4444
### Invisible button
4545

4646
The `invisible` variant of `Button` indicates that the action is a low priority one.
4747

48-
```jsx live drafts
48+
```jsx live
4949
<Button variant="invisible">Invisible</Button>
5050
```
5151

5252
### Different sized buttons
5353

5454
`Button` component supports three different sizes. `small`, `medium`, `large`.
5555

56-
```jsx live drafts
56+
```jsx live
5757
<>
5858
<Button size="small">Search</Button>
5959
<Button sx={{mt: 2}}>Search</Button>
@@ -68,7 +68,7 @@ The `invisible` variant of `Button` indicates that the action is a low priority
6868
We can place an inside the `Button` in either the leading or the trailing position to enhance the visual context.
6969
It is recommended to use an octicon here.
7070

71-
```jsx live drafts
71+
```jsx live
7272
<>
7373
<Button leadingIcon={SearchIcon}>Search</Button>
7474
<Button trailingIcon={SearchIcon} sx={{mt: 2}}>
@@ -84,15 +84,15 @@ It is recommended to use an octicon here.
8484

8585
A separate component called `IconButton` is used if the action shows only an icon with no text. This button will remain square in shape.
8686

87-
```jsx live drafts
87+
```jsx live
8888
<IconButton icon={SearchIcon}>Search</IconButton>
8989
```
9090

9191
### Different sized icon buttons
9292

9393
`IconButton` also supports the three different sizes. `small`, `medium`, `large`.
9494

95-
```jsx live drafts
95+
```jsx live
9696
<>
9797
<IconButton icon={SearchIcon} size="small">
9898
Search
@@ -112,7 +112,7 @@ A common use case for primer is a button with a counter component which shows th
112112
We provide `Button.Counter` as a composite component which requires you to provide a number as child.
113113
The counter will match the `variant` styles of the parent button.
114114

115-
```jsx live drafts
115+
```jsx live
116116
<Button>
117117
Watch
118118
<Button.Counter>1</Button.Counter>
@@ -124,7 +124,7 @@ The counter will match the `variant` styles of the parent button.
124124
A button can be styled in an appropriate manner using the `sx` prop. This maybe to change width, or to add margins etc.
125125
Here's an example of a block button which takes 100% of available width. Checkout [styled-system](https://styled-system.com/) to see what you can send in an `sx` prop.
126126

127-
```jsx live drafts
127+
```jsx live
128128
<Button sx={{width: '100%'}}>Block</Button>
129129
```
130130

docs/content/IconButton.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: IconButton
33
status: Alpha
4-
source: https://github.com/primer/react/tree/main/src/Button2
5-
storybook: '/react/storybook?path=/story/composite-components-button2'
4+
source: https://github.com/primer/react/tree/main/src/Button
5+
storybook: '/react/storybook?path=/story/composite-components-button'
66
description: An accessible button component with no text and only icon.
77
---
88

@@ -11,22 +11,22 @@ description: An accessible button component with no text and only icon.
1111
### Installation
1212

1313
```js
14-
import {IconButton} from '@primer/react/drafts'
14+
import {IconButton} from '@primer/react'
1515
```
1616

1717
### Icon only button
1818

1919
A separate component called `IconButton` is used if the action shows only an icon with no text. This button will remain square in shape.
2020

21-
```jsx live drafts
22-
<IconButton icon={SearchIcon}>Search</IconButton>
21+
```jsx live
22+
<IconButton aria-label="Search" icon={SearchIcon} />
2323
```
2424

2525
### Different sized icon buttons
2626

2727
`IconButton` also supports the three different sizes. `small`, `medium`, `large`.
2828

29-
```jsx live drafts
29+
```jsx live
3030
<>
3131
<IconButton aria-label="Search" icon={SearchIcon} size="small" />
3232
<IconButton aria-label="Search" sx={{ml: 2}} icon={SearchIcon} />

0 commit comments

Comments
 (0)