File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
workspaces/simon-game/src/app/components Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ export function App() {
66 return (
77 < div >
88 < Box color = "red" />
9- < Box color = {
10- // cobalt blue
11- "#0050B5"
12- } />
9+ < Box
10+ color = {
11+ // cobalt blue
12+ "#0050B5"
13+ }
14+ />
1315 < Box color = "green" />
1416 < Box color = "yellow" />
1517 </ div >
Original file line number Diff line number Diff line change 11import React from "react" ;
22
3- type Props = { color ?: string ; height ?: number ; width ?: number } ;
3+ type Props = {
4+ color ?: string ;
5+ height ?: number ;
6+ width ?: number ;
7+ margin ?: number ;
8+ } ;
49
510export function Box ( props : Props ) {
611 return (
@@ -10,7 +15,7 @@ export function Box(props: Props) {
1015 height : props . height ?? 100 ,
1116 width : props . width ?? 100 ,
1217 borderRadius : 20 , // rounded corners
13- margin : 10 , // spaces
18+ margin : props . margin , // spaces between boxes
1419 } }
1520 />
1621 ) ;
You can’t perform that action at this time.
0 commit comments