-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add input and all inputable components prop size #2463
feat: add input and all inputable components prop size #2463
Conversation
Features
Bug FixesContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
Visit the preview URL for this PR (updated for commit 391fd84): https://react-rainbow--pr2463-feat-add-input-and-a-9r6pk514.web.app (expires Fri, 14 Oct 2022 00:41:46 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
…to feat-add-input-and-all-inputable-components-prop-size
@@ -7,7 +7,7 @@ import StyledItemDescription from '../RadioGroup/styled/itemDescription'; | |||
import RenderIf from '../RenderIf'; | |||
|
|||
export default function CheckboxList(props) { | |||
const { values, options, onChange, describedBy, name, error } = props; | |||
const { values, options, onChange, describedBy, name, error, size } = props; |
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.
here in this component we will not add this for now
src/components/DatePicker/index.js
Outdated
@@ -219,6 +221,8 @@ DatePicker.propTypes = { | |||
disabledDays: PropTypes.arrayOf( | |||
PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]), | |||
), | |||
/** The size of the input. Valid values are small, and large. */ |
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.
are small, medium, and large.
@@ -222,6 +224,8 @@ DateTimePicker.propTypes = { | |||
disabledDays: PropTypes.arrayOf( | |||
PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]), | |||
), | |||
/** The size of the input. Valid values are small, and large. */ |
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.
same ^^
@@ -18,7 +18,9 @@ export default function Label(props) { | |||
return ( | |||
<label htmlFor={inputId} id={id}> | |||
<span className="rainbow-input_faux" /> | |||
<StyledLabelText disabled={disabled}>{label}</StyledLabelText> | |||
<StyledLabelText disabled={disabled} size={size}> |
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.
same ^^ I think we don't need this here for now
props.size === 'small' && | ||
` | ||
font-size: ${FONT_SIZE_TEXT_MEDIUM}; | ||
`}; |
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.
same ^^
src/components/Input/index.js
Outdated
@@ -147,6 +147,8 @@ Input.propTypes = { | |||
* | |||
* For a detailed list, go to: https://www.w3.org/TR/WCAG21/#input-purposes */ | |||
autoComplete: PropTypes.string, | |||
/** The size of the input. Valid values are small, and large. */ |
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.
small, medium, and large
@@ -75,13 +76,15 @@ export default class Checkbox extends Component { | |||
aria-describedby={ariaDescribedBy} | |||
ref={this.inputRef} | |||
error={error} | |||
size={size} |
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.
not for now here in checkbox
@@ -96,6 +97,7 @@ export default class InputCheckbox extends Component { | |||
error={error} | |||
label={label} | |||
hideLabel={hideLabel} | |||
size={size} |
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.
not now
` | ||
width: 18px; | ||
height: 18px; | ||
`}; |
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.
same ^^
@@ -74,6 +74,7 @@ export default class InputRadio extends Component { | |||
name, | |||
checked, | |||
hideLabel, | |||
size, |
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.
same ^^
@@ -75,13 +76,15 @@ export default class Radio extends Component { | |||
aria-describedby={ariaDescribedBy} | |||
ref={this.inputRef} | |||
error={error} | |||
size={size} |
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.
same ^^
height: 25px; | ||
`}; | ||
|
||
${props => |
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.
same ^^
Code Climate has analyzed commit 391fd84 and detected 6 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
fix: #2462
Changes proposed in this PR:
feat: add input and all inputable components prop size
I have followed (at least) the PR section of the contributing guide.
@nexxtway/react-rainbow