-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create
StatsInfoButton
component
For #348. Came out of phetsims/qa#869.
- Loading branch information
Showing
2 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2022, University of Colorado Boulder | ||
|
||
/** | ||
* | ||
* | ||
* @author Liam Mulhall <[email protected]> | ||
*/ | ||
|
||
import infoCircle from '../img/info-circle.svg'; | ||
|
||
const StatsInfoButton = ( { statsString } ) => { | ||
const buttonStyle = { | ||
marginRight: '6px', | ||
padding: '0' | ||
}; | ||
return ( | ||
<button | ||
onClick={() => window.alert( statsString )} | ||
style={buttonStyle} | ||
type='button' | ||
className='btn btn-light' | ||
data-bs-toggle='tooltip' | ||
data-bs-placement='top' | ||
title={statsString}> | ||
<img src={infoCircle} alt='info icon'/> | ||
</button> | ||
); | ||
}; | ||
|
||
export default StatsInfoButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters