Search code examples
reactjsnpmyarnpkg

How can I change "unlocked" default text showing in react swipe button


I am working on react swipe button. By default it shows "unlocked" on button. I am using react swipe button yarn package . How can I change the text "unlocked" to "Completed"?

Need to change the text "unlocked" to"completed"


Solution

  • I took a look at the source code, and it seems like there's a text_unlocked prop you can pass to the component.

    <ReactSwipeButton
       ... 
       text_unlocked='Completed'
    />
    

    Note that it doesn't seem to be listed as part of the official documentation, so you may run into problems if the developer did not intend to expose this property.