# Add support for optional icon to \`Button\` \(\#3479\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c3e7732eabe75284c966031672166591762e5a9c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c3e7732eabe75284c966031672166591762e5a9c

Requested commit: c3e7732eabe75284c966031672166591762e5a9c

Commit: c3e7732eabe75284c966031672166591762e5a9c

Tree: 849a23df12495b14b5780c4a508ac982fb1289e2

Author: Marshall Bowers

Committer: GitHub

## Message

```
Add support for optional icon to `Button` (#3479)

This PR extends `Button` with support for an optional icon to be
displayed next to the label.

As part of this, the functionality for displaying an icon within a
button has been factored out into an internal `ButtonIcon` component.
`ButtonIcon` is now used by both `IconButton` and `Button` to
encapsulate the concerns of an icon that is rendered within a button.

Release Notes:

- N/A
```

## Parents

- [4b23c5c658351a2132a5c0af5aab86b0782c56b9](https://git.cafe/gitcafe/zed/commit/4b23c5c658351a2132a5c0af5aab86b0782c56b9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c3e7732eabe75284c966031672166591762e5a9c?format=markdown)
