Skip to content

Commit 40f8d81

Browse files
authored
update icon only example in Button.mdx
1 parent a61463d commit 40f8d81

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/content/Button.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ It is recommended to use an octicon here.
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

8787
```jsx live
88-
<IconButton icon={SearchIcon}>Search</IconButton>
88+
<IconButton aria-label="Search" icon={SearchIcon} />
8989
```
9090

9191
### Different sized icon buttons
@@ -94,15 +94,9 @@ A separate component called `IconButton` is used if the action shows only an ico
9494

9595
```jsx live
9696
<>
97-
<IconButton icon={SearchIcon} size="small">
98-
Search
99-
</IconButton>
100-
<IconButton sx={{ml: 2}} icon={SearchIcon}>
101-
Search
102-
</IconButton>
103-
<IconButton sx={{ml: 2}} icon={SearchIcon} size="large">
104-
Search
105-
</IconButton>
97+
<IconButton aria-label="Search" size="small" icon={SearchIcon} />
98+
<IconButton aria-label="Search" icon={SearchIcon} sx={{ml: 2}} />
99+
<IconButton aria-label="Search" size="large" icon={SearchIcon} sx={{ml: 2}} />
106100
</>
107101
```
108102

0 commit comments

Comments
 (0)