9 changed files with 128 additions and 81 deletions
			
			
		- 
					1install-and-build.sh
- 
					14my-bois/src/components/Bois.css
- 
					91my-bois/src/components/Bois.jsx
- 
					17my-bois/src/components/Contexts.jsx
- 
					10my-bois/src/components/Milestones.jsx
- 
					13my-bois/src/components/Misc.css
- 
					35my-bois/src/components/Misc.jsx
- 
					2my-bois/src/hooks/milestones.js
- 
					4my-bois/src/hooks/useKey.js
| @ -0,0 +1,13 @@ | |||
| .Warning { | |||
|   margin-top: 1em; | |||
|   font-weight: 800; | |||
|   font-size: 150%; | |||
| } | |||
| 
 | |||
| .Info { | |||
|   font-size: 80%; | |||
| } | |||
| 
 | |||
| .Info table td:first-child { | |||
|   padding-right: 1ch; | |||
| } | |||
| @ -0,0 +1,35 @@ | |||
| import React from 'react'; | |||
| import {COLOR_VERY_BAD} from "../helpers/color"; | |||
| 
 | |||
| import "./Misc.css"; | |||
| 
 | |||
| const Filter = ({bool, children}) => bool ? <>{children}</> : null; | |||
| 
 | |||
| export const StateFilter = ({current, required, children}) => ( | |||
|   <Filter bool={current === required}>{children}</Filter> | |||
| ); | |||
| 
 | |||
| export const Warning = ({children}) => ( | |||
|   <div className="Warning" style={{color: COLOR_VERY_BAD}}> | |||
|     {children} | |||
|   </div> | |||
| ); | |||
| 
 | |||
| export const Info = ({children}) => ( | |||
|   <div className="Info"> | |||
|     {children} | |||
|   </div> | |||
| ); | |||
| 
 | |||
| export const InfoTable = ({keyValuePairs}) => ( | |||
|   <Info> | |||
|     <table> | |||
|       {keyValuePairs.map(({key, value}) => ( | |||
|         <tr key={key}> | |||
|           <td>{key}:</td> | |||
|           <td><b>{value}</b></td> | |||
|         </tr> | |||
|       ))} | |||
|     </table> | |||
|   </Info> | |||
| ); | |||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue