show a span on tag hover to delete it maybe
This commit is contained in:
		| @@ -1,19 +1,37 @@ | |||||||
| .tagbtn { | .btnnostyle { | ||||||
|     background-color: #3574fe; |     background: none; | ||||||
|  |     color: inherit; | ||||||
|     border: none; |     border: none; | ||||||
|  |     padding: 0; | ||||||
|  |     font: inherit; | ||||||
|  |     cursor: pointer; | ||||||
|  |     outline: inherit; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .tagbtnContainer { | ||||||
|  |     background-color: #3574fe; | ||||||
|     border-radius: 10px; |     border-radius: 10px; | ||||||
|     color: white; |     color: white; | ||||||
|     margin-left: 10px; |     margin-left: 10px; | ||||||
|     margin-top: 15px; |     margin-top: 15px; | ||||||
|  |     width: 50px; | ||||||
|     /*font-weight: bold;*/ |     /*font-weight: bold;*/ | ||||||
|     padding: 5px 15px 5px 15px; |     padding: 5px 15px 5px 15px; | ||||||
| } | } | ||||||
|  |  | ||||||
| .tagbtn:focus { | .tagbtnContainer:focus { | ||||||
|     background-color: #004eff; |     background-color: #004eff; | ||||||
|     outline: none; |     outline: none; | ||||||
| } | } | ||||||
|  |  | ||||||
| .tagbtn:hover { | .tagbtnContainer:hover { | ||||||
|     background-color: #004eff; |     background-color: #004eff; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .deletebtn{ | ||||||
|  |     display: none; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .tagbtnContainer:hover .deletebtn { | ||||||
|  |     display: inline; | ||||||
|  | } | ||||||
|   | |||||||
| @@ -42,10 +42,13 @@ class Tag extends React.Component<props, state> { | |||||||
|  |  | ||||||
|     renderButton(): JSX.Element { |     renderButton(): JSX.Element { | ||||||
|         return ( |         return ( | ||||||
|             <button className={styles.tagbtn} |             <span className={styles.tagbtnContainer}> | ||||||
|                     onClick={(): void => this.TagClick()} |                 <button className={styles.btnnostyle} | ||||||
|                     onContextMenu={this.contextmenu} |                         onClick={(): void => this.TagClick()} | ||||||
|                     data-testid='Test-Tag'>{this.props.tagInfo.TagName}</button> |                         onContextMenu={this.contextmenu} | ||||||
|  |                         data-testid='Test-Tag'>{this.props.tagInfo.TagName}</button> | ||||||
|  |                 <span className={styles.deletebtn}>X</span> | ||||||
|  |             </span> | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user