NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

badge dynamic style on click?

Open Andresagustin opened this issue 8 years ago • 1 comments

Hi all! thanks for this AMAZING library, much appreciated. We are currently using badges as a list (like a pillbox). This list of badges is created dinamically with a list who cames from the s/erver. My question is... how can we change the color of the badge when clicked? (if we have 20 badges and we click on the 3rd we want to have a different color for the clicked one).

Is this possible?

Thanks again!!!

Andresagustin avatar Nov 12 '18 14:11 Andresagustin

I made it to work using:

           <Badge containerStyle={
                  (this.state.selectSubcategory === l.name)
                      ? styles.welcomePress
                      : styles.welcome
              }.....

Andresagustin avatar Nov 12 '18 15:11 Andresagustin