Skip to content

Commit f6365f3

Browse files
committed
Css Enhancement...
1 parent 71baf4c commit f6365f3

File tree

9 files changed

+25
-20
lines changed

9 files changed

+25
-20
lines changed

package-lock.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"react": "^17.0.2",
1212
"react-dom": "^17.0.2",
1313
"react-scripts": "4.0.3",
14+
"uuid": "^8.3.2",
1415
"web-vitals": "^1.1.2"
1516
},
1617
"scripts": {

src/components/App/App.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,35 @@ import ResultContainer from '../ResultContainer/ResultContainer';
44
import SearchBox from '../SearchBox/SearchBox';
55
import './App.css';
66

7+
//Adding up Git-hub Startup-Name Generator
78
const name = require('@rstacruz/startup-name-generator');
89

910
class App extends React.Component {
1011

12+
//State
1113
state = {
1214
headerTitle: "Name-It!",
1315
isChanged: true,
1416
suggestedNames: []
1517
};
1618

19+
//CallBack function triggered from SearchBox Component
1720
handleInputChange = (InputChangeValue) => {
1821
this.setState({
1922
isChanged: !InputChangeValue,
2023
suggestedNames: InputChangeValue ? name(InputChangeValue) : []
2124
});
2225
};
2326

27+
//Rendering Components
2428
render() {
2529
return (
2630
<div>
27-
<Header isChanged={this.state.isChanged} headTitle={this.state.headerTitle} />
31+
<Header isChanged={this.state.isChanged} headTitle={this.state.headerTitle} />
2832
<SearchBox onInputChange={this.handleInputChange} />
2933
<ResultContainer suggestedNames={this.state.suggestedNames} />
3034
</div>
31-
)
35+
);
3236
}
3337
}
3438

src/components/Header/Header.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: flex;
33
flex-direction: column;
44
align-items: center;
5-
margin-top: 100px;
5+
margin-top: 60px;
66
}
77

88
.head-image {
@@ -11,8 +11,8 @@
1111
}
1212

1313
.head-image-expanded {
14-
min-width: 230px;
15-
max-width: 250px;
14+
min-width: 250px;
15+
max-width: 230px;
1616
}
1717

1818
.head-image-contracted {
@@ -23,11 +23,11 @@
2323
.head-text {
2424
font-family: 'Hachi Maru Pop', cursive;
2525
margin: 5px 0px 15px 0px;
26-
transition: font-size 1s;
26+
transition: font-size 1s, font-size 1s;
2727
}
2828

2929
.head-text-expanded {
30-
font-size: 50px;
30+
font-size: 36px;
3131
}
3232

3333
.head-text-contracted {

src/components/NameCard/NameCard.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const nameCheapURL = 'https://www.namecheap.com/domains/registration/results/?do
55

66
const NameCard = ({ suggestedName }) => {
77
return (
8-
<a className="card-link" href={`${nameCheapURL}${suggestedName}`}>
8+
<a target="_blank"
9+
rel="noreferrer"
10+
className="card-link" href={`${nameCheapURL}${suggestedName}`}>
911
<div className="name-card-container">
1012
<p className="name-card">{suggestedName}</p>
1113
</div>

src/components/ResultContainer/ResultContainer.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
display: flex;
33
justify-content: center;
44
flex-wrap: wrap;
5-
padding: 40px 100px;
6-
font-size: larger;
7-
5+
padding: 20px 40px;
86
}

src/components/ResultContainer/ResultContainer.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import React from 'react';
22
import NameCard from '../NameCard/NameCard';
33
import './ResultContainer.css';
44

5+
const { v4: uuidv4 } = require('uuid');
6+
57
const resultContainer = ({ suggestedNames }) => {
68

79
const suggestedNamesJSX = suggestedNames.map((suggestedName) => {
8-
return <NameCard key={suggestedName} suggestedName={suggestedName} />
10+
return <NameCard key={uuidv4()} suggestedName={suggestedName} />
911
});
1012

1113
return (

src/components/SearchBox/SearchBox.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.search-container {
22
display: flex;
33
justify-content: center;
4-
margin: 10px 30px 0px 30px;
4+
margin: 10px;
55
}
66

77
.search-input {
8-
padding: 15px 80px;
9-
font-size: x-large;
10-
width: 400px;
8+
padding: 8px 15px;
9+
10+
width: 250px;
1111
border-width: 0;
1212
background: #a592f2;
1313
color: #e7e9f0;
@@ -17,7 +17,6 @@
1717

1818
.search-input::placeholder {
1919
color: #e7e9f0;
20-
font-size: x-large;
2120
}
2221

2322
.search-input:focus {

src/components/SearchBox/SearchBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const searchBox = ({ onInputChange }) => {
77
<input
88
onChange={(event) => onInputChange(event.target.value)}
99
className="search-input"
10-
placeholder="Search your Keywords here!" />
10+
placeholder="Type Keywords Here" />
1111
</div>
1212
);
1313
};

0 commit comments

Comments
 (0)