-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from pshenmic/feat/list-navigation-upd
Add page size on blocks page
- Loading branch information
Showing
6 changed files
with
249 additions
and
31 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
packages/frontend/src/components/goToHeightForm/GoToHeightForm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import "./go_to_height_form.css"; | ||
|
||
// import React, {useState} from 'react'; | ||
|
||
export default function GoToHeightForm({goToHeightHandler, goToHeightChangeHandle, heightCorrection}) { | ||
|
||
return ( | ||
<form className='go_to_height_form' onSubmit={goToHeightHandler}> | ||
<div className='go_to_height_form__title'>Go to height</div> | ||
<input | ||
className={heightCorrection ? 'go_to_height_form__input' : 'go_to_height_form__input go_to_height_form__input--incorrect'} | ||
onInput={goToHeightChangeHandle} | ||
type='number' | ||
placeholder='Height' | ||
/> | ||
<button className='go_to_height_form__button' disabled={!heightCorrection}>go</button> | ||
</form> | ||
); | ||
} |
49 changes: 49 additions & 0 deletions
49
packages/frontend/src/components/goToHeightForm/go_to_height_form.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.go_to_height_form { | ||
width: 115px; | ||
} | ||
|
||
.go_to_height_form__title { | ||
margin-bottom: 4px; | ||
} | ||
|
||
.go_to_height_form__input, | ||
.go_to_height_form__input:focus { | ||
width: 80px; | ||
padding: 0 8px; | ||
margin-right: 6px; | ||
height: 29px; | ||
box-sizing: border-box; | ||
border: 1px solid #fff; | ||
border-radius: 5px; | ||
-webkit-appearance: none; | ||
-moz-appearance: textfield; | ||
} | ||
|
||
.go_to_height_form__input::-webkit-outer-spin-button, | ||
.go_to_height_form__input::-webkit-inner-spin-button { | ||
-webkit-appearance: none; | ||
} | ||
|
||
.go_to_height_form__input--incorrect { | ||
/* border-color: #ffa1a1; | ||
background-color: #ffa1a1; */ | ||
color: gray; | ||
} | ||
|
||
.go_to_height_form__button { | ||
background-color: transparent; | ||
border: 1px solid #ffffff75; | ||
border-radius: 5px; | ||
height: 29px; | ||
color: #fff; | ||
} | ||
|
||
.go_to_height_form__button:disabled { | ||
color: gray; | ||
} | ||
|
||
.go_to_height_form__button:hover:not(:disabled) { | ||
border: 1px solid #ffffff; | ||
background-color: #ffffff15; | ||
cursor: pointer; | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/frontend/src/components/pageSizeSelector/PageSizeSelector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import "./page_size_selector.css"; | ||
|
||
export default function PageSizeSelector({PageSizeSelectHandler, defaultValue, items}) { | ||
return ( | ||
<div className='items_on_page_selector'> | ||
<div className='items_on_page_selector__title'>Items on page</div> | ||
<select onChange={PageSizeSelectHandler} defaultValue={defaultValue}> | ||
{items.map(item => { | ||
return <option value={item} key={'PSS' + item}>{item}</option>; | ||
})} | ||
</select> | ||
</div> | ||
); | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/frontend/src/components/pageSizeSelector/page_size_selector.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.items_on_page_selector {} | ||
|
||
.items_on_page_selector__title { | ||
margin-bottom: 4px; | ||
} | ||
|
||
.items_on_page_selector select { | ||
width: 80px; | ||
height: 29px; | ||
box-sizing: border-box; | ||
border: 1px solid #fff; | ||
border-radius: 5px; | ||
padding: 0 4px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters