Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #130 from PanSpagetka/category-force-line-wrap
Browse files Browse the repository at this point in the history
Add forced line wrap for category select
  • Loading branch information
karelhala authored Jul 9, 2019
2 parents 64b4eee + 0fef1a8 commit d5d29d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/forms/select-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ const customStyles = {
position: 'relative',
top: 10,
}),
option: (provided, { isFocused, isSelected, isMulti }) => ({
option: (provided, {
isFocused, isSelected, isMulti, breakAll,
}) => ({
...provided,
'background-color': isSelected ? '#0088ce' : isFocused ? '#def3ff' : '#ffffff', // eslint-disable-line no-nested-ternary
'border-color': isSelected ? '#0088ce' : isFocused ? '#bee1f4' : 'transparent', // eslint-disable-line no-nested-ternary
'border-style': 'solid',
'border-width': '1px 0',
'word-break': breakAll ? 'break-all' : 'break-word',
color: isSelected ? '#fff' : isFocused ? '#4d5258' : provided.color, // eslint-disable-line no-nested-ternary
padding: '1px 10px',
fontWeight: '400',
Expand Down
1 change: 1 addition & 0 deletions src/tagging/components/InnerComponents/TagSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TagSelector extends React.Component {
<Select
id="tag_cat"
value={val}
breakAll
className="final-form-select"
optionClassName="selected-option final-form-select-option"
styles={customStyles}
Expand Down
1 change: 1 addition & 0 deletions src/tagging/tests/__snapshots__/tag.selector.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

exports[`Tagging modifier match snapshot 1`] = `
<StateManager
breakAll={true}
className="final-form-select"
classNamePrefix="react-select"
clearable={false}
Expand Down

0 comments on commit d5d29d9

Please sign in to comment.