final design
This commit is contained in:
+59
-25
@@ -6,26 +6,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input-box {
|
.input-box {
|
||||||
display: flex;
|
display: grid;
|
||||||
gap: 0;
|
gap: 10px;
|
||||||
width: 100%;
|
column-gap: 10vw;
|
||||||
justify-content: center;
|
width: 98vw;
|
||||||
|
max-width: calc(3 * 200px + 10vw * 2);
|
||||||
|
min-height: 100vh;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||||
|
grid-auto-rows: fit-content(300px);
|
||||||
|
|
||||||
|
justify-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: fit-content;
|
|
||||||
flex-wrap: wrap;
|
align-self: center;
|
||||||
|
justify-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-component-box {
|
.input-component-box {
|
||||||
display: grid;
|
display: grid;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
min-width: 200px;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
grid-template-rows: 50px 160px 50px;
|
grid-template-rows: 30px minmax(150px, 1fr) fit-content(30px);
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 60px;
|
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-component-box.text {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
@@ -83,11 +94,13 @@
|
|||||||
|
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 2px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.review-select-button:hover {
|
.review-select-button:hover {
|
||||||
border-color: white;
|
border: 2px solid white;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.review-select-menu {
|
.review-select-menu {
|
||||||
@@ -111,7 +124,7 @@
|
|||||||
|
|
||||||
.review-select-item {
|
.review-select-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid var(--surface);
|
border: 2px solid var(--surface);
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -121,6 +134,12 @@
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.review-select-item:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.rating .review-select-box-0 {
|
.rating .review-select-box-0 {
|
||||||
border-bottom-left-radius: var(--radius);
|
border-bottom-left-radius: var(--radius);
|
||||||
border-top-left-radius: var(--radius);
|
border-top-left-radius: var(--radius);
|
||||||
@@ -136,11 +155,6 @@
|
|||||||
border-bottom-right-radius: var(--radius);
|
border-bottom-right-radius: var(--radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.review-select-item:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
border-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.review-text-box {
|
.review-text-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -152,11 +166,11 @@
|
|||||||
|
|
||||||
.review-text {
|
.review-text {
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow: hidden;
|
overflow:auto;
|
||||||
width: 300px;
|
width: min(600px, 98vw);
|
||||||
height: 160px;
|
height: 400px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--surface);
|
border: 2px solid var(--bg);
|
||||||
background: var(--surface);
|
background: var(--surface);
|
||||||
color: black;
|
color: black;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@@ -164,14 +178,34 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* width of scrollbar */
|
||||||
|
.review-text::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* track (background) */
|
||||||
|
.review-text::-webkit-scrollbar-track {
|
||||||
|
background: #aeaeae;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* handle */
|
||||||
|
.review-text::-webkit-scrollbar-thumb {
|
||||||
|
background: #535353;
|
||||||
|
border-radius: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hover effect */
|
||||||
|
.review-text::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: #2e2e2e;
|
||||||
|
}
|
||||||
|
|
||||||
.review-text:focus {
|
.review-text:focus {
|
||||||
border: 1px solid white;
|
border: 2px solid white;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.review-text::placeholder {
|
.review-text::placeholder {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-button.send-review {
|
|
||||||
margin: 60px;
|
|
||||||
}
|
|
||||||
+19
-17
@@ -12,7 +12,7 @@ function Reviews() {
|
|||||||
const [selectedRating, setSelectedRating] = useState(1);
|
const [selectedRating, setSelectedRating] = useState(1);
|
||||||
const [text, setText] = useState("");
|
const [text, setText] = useState("");
|
||||||
|
|
||||||
const MAX_TEXT = 180;
|
const MAX_TEXT = 900;
|
||||||
|
|
||||||
|
|
||||||
const fetchReviews = async () => {
|
const fetchReviews = async () => {
|
||||||
@@ -109,21 +109,6 @@ function Reviews() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='input-component-box'>
|
|
||||||
<p className='description'>Review</p>
|
|
||||||
<textarea
|
|
||||||
autoCorrect="off"
|
|
||||||
autoCapitalize="off"
|
|
||||||
spellCheck={false}
|
|
||||||
className='review-text input-component'
|
|
||||||
type="text"
|
|
||||||
value={text}
|
|
||||||
onChange={(e) => handleTextInput(e)}
|
|
||||||
placeholder="Type something..."
|
|
||||||
/>
|
|
||||||
<p className='description second'>{text.length}/{MAX_TEXT}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='input-component-box'>
|
<div className='input-component-box'>
|
||||||
<p className='description'>Rating</p>
|
<p className='description'>Rating</p>
|
||||||
<SelectDropdown
|
<SelectDropdown
|
||||||
@@ -136,13 +121,30 @@ function Reviews() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='button-div'>
|
<div className='input-component-box'>
|
||||||
|
<div className='button-div input-component'>
|
||||||
<button id='button-send' style={{ display: "none" }} onClick={sendReview} />
|
<button id='button-send' style={{ display: "none" }} onClick={sendReview} />
|
||||||
<label htmlFor="button-send" className="custom-button send-review">
|
<label htmlFor="button-send" className="custom-button send-review">
|
||||||
Send Review
|
Send Review
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className='input-component-box text'>
|
||||||
|
<p className='description'>Review</p>
|
||||||
|
<textarea
|
||||||
|
autoCorrect="off"
|
||||||
|
autoCapitalize="off"
|
||||||
|
spellCheck={false}
|
||||||
|
className='review-text input-component'
|
||||||
|
type="text"
|
||||||
|
value={text}
|
||||||
|
onChange={(e) => handleTextInput(e)}
|
||||||
|
placeholder="Share your Opinion"
|
||||||
|
/>
|
||||||
|
<p className='description second'>{text.length}/{MAX_TEXT}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>)
|
</>)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: rgb(4, 0, 10);
|
background: var(--bg);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
--surface: rgb(47, 168, 208);
|
--surface: rgb(47, 168, 208);
|
||||||
|
--bg: rgb(4, 0, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|||||||
Reference in New Issue
Block a user