nativescript-floatingactionbutton icon indicating copy to clipboard operation
nativescript-floatingactionbutton copied to clipboard

text is not working.

Open Devendra0110 opened this issue 5 years ago • 6 comments

<FAB row="0" col="1" text="&#xf00d;" rippleColor="#f1f1f1" class="fab-button" ></FAB> I tried font-awesome text but it's not showing .

Devendra0110 avatar Feb 25 '20 09:02 Devendra0110

I don't believe text has ever been supported with this plugin, due to the native classes not providing that OOTB. It is possible to achieve this but would require an enhancement to the source. Would be happy to help with any PRs to make this happen.

However, if you're on a time crunch, making circular buttons in NS is simple with the border-radius styling option and from there you could put text inside the standard NS button.

bradmartin avatar Feb 25 '20 19:02 bradmartin

Well, it's given in the API.

Allows to use text instead of image

Devendra0110 avatar Feb 26 '20 06:02 Devendra0110

Oh wow yeah you're right. Guess I've never used it 😁. Then seems like a bug or usage issue. Does that icon work in a simple Label? If so then we can confirm you have the font loaded and the CSS for the font correct.

bradmartin avatar Feb 26 '20 15:02 bradmartin

Yeah it's working perfectly with Label but not with FAB

Devendra0110 avatar Feb 28 '20 11:02 Devendra0110

It does work for me. I use text.decode="&#xe5db;" and Nativescript-vue

dosomder avatar May 06 '20 17:05 dosomder

Yeah it's working perfectly with Label but not with FAB

You forgot to add required 'fas' or 'far' class which is needed for FontAwesome icons.

CatchABus avatar Jun 12 '20 18:06 CatchABus