# Add DecoratedIcon \(\#11512\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 47ca3438034ec6c7e5f8b17a5e9274ebc4cc24eb

Requested commit: 47ca3438034ec6c7e5f8b17a5e9274ebc4cc24eb

Commit: 47ca3438034ec6c7e5f8b17a5e9274ebc4cc24eb

Tree: fe0b1606dd0de417321836156a4a183e7ca41352

Author: Nate Butler

Committer: GitHub

## Message

````
Add DecoratedIcon (#11512)

This allows us to create icons with dynamic decorations drawn on top
like these:


![image](https://github.com/zed-industries/zed/assets/1714999/1d1a22df-8f90-47f2-abbd-ed7afa8fc641)

### Examples:

```rust
div()
    .child(DecoratedIcon::new(
        Icon::new(IconName::Bell).color(Color::Muted),
        IconDecoration::IndicatorDot,
    ))
    .child(
        DecoratedIcon::new(Icon::new(IconName::Bell), IconDecoration::IndicatorDot)
            .decoration_color(Color::Accent),
    )
    .child(DecoratedIcon::new(
        Icon::new(IconName::Bell).color(Color::Muted),
        IconDecoration::Strikethrough,
    ))
    .child(
        DecoratedIcon::new(Icon::new(IconName::Bell), IconDecoration::X)
            .decoration_color(Color::Error),
    )
```

Release Notes:

- N/A
````

## Parents

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

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