This repository was archived by the owner on Mar 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
fixed styles for job-rb #79
Merged
maxceem
merged 3 commits into
topcoder-archive:feature/job-rb-management
from
dashu-baba:feature/job-rb-management
Feb 7, 2021
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -30,4 +30,5 @@ | |
font-weight: 500; | ||
margin-top: 2px; | ||
text-align: left; | ||
word-break: break-all; | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -8,53 +8,75 @@ import PT from "prop-types"; | |
import Select from "react-select"; | ||
import "./styles.module.scss"; | ||
|
||
const ReactSelect = ({ | ||
value, | ||
onChange, | ||
placeholder, | ||
error, | ||
isMulti, | ||
options, | ||
}) => { | ||
const ReactSelect = (props) => { | ||
const customStyles = { | ||
control: (provided, state) => ({ | ||
...provided, | ||
minHeight: "36px", | ||
borderColor: state.isFocused ? "#55a5ff" : provided.borderColor, | ||
boxShadow: state.isFocused ? "0 0 2px 1px #cee6ff" : provided.boxShadow | ||
}), | ||
menu: (provided, state) => ({ | ||
menu: (provided) => ({ | ||
...provided, | ||
minHeight: "36px", | ||
zIndex: 10, | ||
}), | ||
valueContainer: (provided, state) => ({ | ||
valueContainer: (provided) => ({ | ||
...provided, | ||
padding: "0 6px", | ||
padding: "1px 6px", | ||
}), | ||
input: (provided, state) => ({ | ||
input: (provided) => ({ | ||
...provided, | ||
margin: "0px", | ||
height: "36px", | ||
height: "auto", | ||
padding: "0", | ||
|
||
}), | ||
indicatorSeparator: (state) => ({ | ||
indicatorSeparator: () => ({ | ||
display: "none", | ||
}), | ||
indicatorsContainer: (provided, state) => ({ | ||
indicatorsContainer: (provided) => ({ | ||
...provided, | ||
height: "36px", | ||
}), | ||
option: (provided) => ({ | ||
...provided, | ||
height: "40px", | ||
minHeight: "32px" | ||
}), | ||
placeholder: (provided) => ({ | ||
...provided, | ||
color: "#AAAAAA", | ||
fontFamily: "Roboto", | ||
fontSize: "16px", | ||
lineHeight: "22px", | ||
textAlign: "left", | ||
fontWeight: "300" | ||
}), | ||
multiValue: (provided) => ({ | ||
...provided, | ||
margin: "4px 4px", | ||
color: "#AAAAAA", | ||
fontFamily: "Roboto", | ||
fontSize: "14px", | ||
lineHeight: "22px", | ||
textAlign: "left", | ||
borderRadius: "5px" | ||
}) | ||
}; | ||
|
||
return ( | ||
<div styleName="select-wrapper"> | ||
<Select | ||
value={value} | ||
value={props.value} | ||
styles={customStyles} | ||
onChange={(val) => { | ||
onChange(val); | ||
props.onChange(val); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we replace this with |
||
}} | ||
options={options} | ||
styleName={error ? "error" : ""} | ||
isMulti={isMulti} | ||
options={props.options} | ||
styleName={props.error ? "error" : ""} | ||
isMulti={props.isMulti} | ||
onBlur={props.onBlur} | ||
onFocus={props.onFocus} | ||
/> | ||
</div> | ||
); | ||
|
@@ -66,6 +88,8 @@ ReactSelect.propTypes = { | |
placeholder: PT.string, | ||
error: PT.string, | ||
isMulti: PT.bool, | ||
onBlur: PT.func, | ||
onFocus: PT.func, | ||
options: PT.arrayOf( | ||
PT.shape({ | ||
value: PT.string.isRequired, | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we directly pass like
onBlur={input.onBlur}
andonFocus={input.onFocus}
?