Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react'
- function Tag(props) {
- const{value} = props
- return (
- <>
- {
- value.length
- ?
- value.map( (dispTag, index) =>{
- return (
- <div className="tag" key={index} >
- <h3>{dispTag }</h3>
- <button className='button' onClick={() => props.removeTag(index)}>x</button>
- </div>)
- })
- :
- null
- }
- </>
- )
- }
- export default Tag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement