Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Use Fontawesome with Swipeout #242

Closed
Base29 opened this issue Dec 8, 2017 · 2 comments
Closed

Use Fontawesome with Swipeout #242

Base29 opened this issue Dec 8, 2017 · 2 comments

Comments

@Base29
Copy link

Base29 commented Dec 8, 2017

Hello Guys ... I want to use Fontawesome Icons for the button text ... I have done this by installing a Fontawesome module and in the text: parameter of button options I passed the instance of the fontawesome module like this

const swipeoutBtns = [
    {
        onPress: () => {
            console.log("Item Deleted");
        },
        text: <FontAwesome style={{fontSize: 26, color: '#FFFFFF'}}>{Icons.trash}</FontAwesome>,
        backgroundColor: '#DC0404'
    }
]

Though I have the icon there instead of text but I am getting a warning shown in this screenshot http://prntscr.com/hknb7u ... how can I fix this ? is there a option that I can use ? Let me know ... Thanks

@nicolasbrugneaux
Copy link

Since the maintainer doesn't seem to want to help you, I can try to give you a piece of advice.

You should use the component props, not the text props if you want to provide custom element.

@Base29
Copy link
Author

Base29 commented Dec 12, 2017

@nicolasbrugneaux ... It worked like a charm ... May be the reason that the maintainer did not replied because I forgot to add a label "Help Wanted" in my post ... Anyways thank you for the help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants