File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useState } from "react" ;
22import zappermentRocksLogo from "./assets/zapperment-rocks-logo.png" ;
33import "./App.css" ;
4+ import { HorizontalRule } from "./HorizontalRule" ;
45
56function App ( ) {
67 const [ showMore , setShowMore ] = useState ( false ) ;
@@ -15,6 +16,7 @@ function App() {
1516 />
1617 < h1 > zapperment.rocks</ h1 >
1718 </ header >
19+ < HorizontalRule />
1820
1921 < div className = "hero" >
2022 < div className = "hero-inner" >
Original file line number Diff line number Diff line change 1+ .horizontal-rule {
2+ display : none;
3+ }
4+
5+ @media (min-width : 900px ) {
6+ .horizontal-rule {
7+ display : flex;
8+ height : 0.6rem ;
9+
10+ width : 100vw ;
11+ position : relative;
12+ left : calc ((100% - 100vw ) / 2 );
13+ box-sizing : border-box;
14+ }
15+ }
16+
17+ .horizontal-rule > * {
18+ flex : 1 ;
19+ }
Original file line number Diff line number Diff line change 1+ import "./HorizontalRule.css" ;
2+
3+ const colours = [
4+ "#FE3636" ,
5+ "#F66C02" ,
6+ "#DBC302" ,
7+ "#85961F" ,
8+ "#14BFAF" ,
9+ "#1A2F96" ,
10+ "#624BAD" ,
11+ "#FD39D4" ,
12+ ] ;
13+
14+ export function HorizontalRule ( ) {
15+ return (
16+ < div className = "horizontal-rule" >
17+ { colours . map ( ( colour ) => (
18+ < div key = { colour } style = { { backgroundColor : colour } } />
19+ ) ) }
20+ </ div >
21+ ) ;
22+ }
You can’t perform that action at this time.
0 commit comments