# Invisible icon problem

**URL:** https://meta.discourse.org/t/invisible-icon-problem/103884
**Category:** Support
**Created:** [December 10, 2018, 10:28am UTC](https://meta.discourse.org/t/invisible-icon-problem/103884 "2018-12-10T10:28:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ankur1857](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ankur1857/32/91555_2.png) [@ankur1857](https://meta.discourse.org/u/ankur1857)
#### Post date: [December 10, 2018, 10:28am UTC](https://meta.discourse.org/t/invisible-icon-problem/103884/1 "2018-12-10T10:28:45Z")

</div>

Following script is not showing icon after **font awesome 5.0** update.  
Please help to make changes in the script.

```
        api.decorateWidget('header-buttons:after', helper => {
            if (Discourse.User.current()) {
                const createTopic = function() {
                    const Composer = require('discourse/models/composer').default;
                    const composerController = Discourse. __container__.lookup('controller:composer');
                    composerController.open({ action: Composer.CREATE_TOPIC, draftKey: Composer.DRAFT });
                }
                return helper.h('button#create-new', {
                    className: "btn fa fa-plus",
                    title: "Create New Topic",
                    onclick: createTopic
                }, '' ); // ''-this is 'text' for the button, change as needed.
            }
        });

```

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [December 10, 2018, 1:05pm UTC](https://meta.discourse.org/t/invisible-icon-problem/103884/2 "2018-12-10T13:05:29Z")

</div>

Assuming you have your own CSS for styling the button, this should get things pretty much back to the way they were:

```html
<script type="text/discourse-plugin" version="0.8">
  const { iconNode } = require("discourse-common/lib/icon-library");
  api.decorateWidget('header-buttons:after', helper => {
      if (Discourse.User.current()) {
        const createTopic = function() {
            const Composer = require('discourse/models/composer').default;
            const composerController = Discourse. __container__.lookup('controller:composer');
            composerController.open({ action: Composer.CREATE_TOPIC, draftKey: Composer.DRAFT });
        }
        return helper.h('button#create-new', {
            className: "btn fa fa-plus no-text",
            title: "Create New Topic",
            onclick: createTopic
        }, iconNode('plus') );
      }
  });
</script>

```

---

<div class="post-metadata">

### Author: ![ankur1857](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ankur1857/32/91555_2.png) [@ankur1857](https://meta.discourse.org/u/ankur1857)
#### Post date: [December 10, 2018, 1:10pm UTC](https://meta.discourse.org/t/invisible-icon-problem/103884/3 "2018-12-10T13:10:57Z")

</div>

It worked perfectly  
thanks

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [January 9, 2019, 1:21pm UTC](https://meta.discourse.org/t/invisible-icon-problem/103884/4 "2019-01-09T13:21:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
