Сделали прогресс бар
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ function Product() {
|
|||||||
{likes > 0 && <button onClick={() => setLikes(0)}>🔄 Сбросить</button> }
|
{likes > 0 && <button onClick={() => setLikes(0)}>🔄 Сбросить</button> }
|
||||||
{likes >= 10 && <h3>Вы достигли лимита!</h3>}
|
{likes >= 10 && <h3>Вы достигли лимита!</h3>}
|
||||||
<div className={styles.progress}>
|
<div className={styles.progress}>
|
||||||
<div className={styles.value}></div>
|
<div className={styles.value} style={{ width: `${likes*10}%`}}></div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
.value {
|
.value {
|
||||||
width:70%;
|
/*width:70%;*/
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: green;
|
background-color: green;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user