Skip to content

Commit 3997877

Browse files
feat: added heading element
1 parent 6386e99 commit 3997877

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@fontsource/league-gothic": "^5.0.18",
1717
"@fontsource/poppins": "^5.0.8",
1818
"@vitejs/plugin-react": "^4.2.1",
19+
"prop-types": "^15.8.1",
1920
"react": "^18.2.0",
2021
"react-dom": "^18.2.0",
2122
"react-router-dom": "^6.22.1",

src/assets/styles/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
margin: 0;
1111
padding: 0;
1212
box-sizing: border-box;
13-
font-family: 'poppins', 'sans-serif';
13+
font-family: "poppins", "sans-serif";
1414
}
1515

1616
a {

src/components/Heading/index.jsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
function Heading({headingText}) {
1+
import PropTypes from "prop-types";
2+
3+
function Heading({ headingText }) {
24
return (
35
<div className="relative text-center font-black uppercase tracking-tighter">
4-
<div className="xs:text-5xl text-[6.5rem] text-outlined text-transparent ">{headingText}</div>
5-
<div className="xs:text-2xl text-[3.75rem] text-foreground absolute w-full bottom-0">{headingText}</div>
6+
<div className="xs:text-4xl sm:text-6xl lg:text-[6.5rem] text-outlined text-transparent ">
7+
{headingText}
8+
</div>
9+
<div className="xs:text-2xl sm:text-4xl lg:text-[3.75rem] text-foreground absolute w-full xs:bottom-[-10px] sm:bottom-[-18px] lg:bottom-[-12px]">
10+
{headingText}
11+
</div>
612
</div>
713
);
814
}
9-
15+
16+
Heading.propTypes = {
17+
headingText: PropTypes.string.isRequired,
18+
};
19+
1020
export default Heading;
11-

src/pages/Home/Hero.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
function Hero() {
22
return (
3-
<div className='bg-background h-screen flex'>
4-
<div className='m-auto'>
5-
<div className="text-7xl md:text-[10rem] text-primary text-center font-gothic uppercase">Codex, SIT</div>
6-
<div className="text-lg md:text-2xl pt-4 text-foreground text-center">Coding Club</div>
3+
<div className="bg-background h-screen flex">
4+
<div className="m-auto">
5+
<div className="text-7xl md:text-[10rem] text-primary text-center font-gothic uppercase">
6+
Codex, SIT
77
</div>
8+
<div className="text-lg md:text-2xl pt-4 text-foreground text-center">
9+
Coding Club
10+
</div>
11+
</div>
812
</div>
913
);
1014
}

src/pages/Home/index.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import Hero from './Hero';
1+
import Hero from "./Hero";
22

33
function Home() {
4-
return (
5-
<>
6-
<Hero/>
7-
</>
8-
);
4+
return <Hero />;
95
}
106

117
export default Home;

0 commit comments

Comments
 (0)