-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow pt-disabled colors in label, select and input-group, and update documentation #448
Conversation
this is not really a "fix" since you're implementing a new modifier. |
const className = classNames( | ||
Classes.CONTROL, | ||
typeClassName, | ||
this.props.className, |
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.
this.props.className
should always come last in classNames()
so user classes take precedence.
Classes.CONTROL, | ||
typeClassName, | ||
this.props.className, | ||
{[Classes.DISABLED]: this.props.disabled}); |
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.
spaces inside braces. { [key]: val }
@@ -169,7 +174,7 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" | |||
</label> | |||
|
|||
:checked - Checked | |||
:disabled - Disabled | |||
:disabled - Disabled. This should be used with a <code>.pt-disabled</code> modifier (not shown below). |
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.
this doesn't explain how to use it. say something about "add .pt-disabled to .pt-control element to change text color," and for all the similar notes below.
@@ -51,7 +51,7 @@ Markup: | |||
<button class="pt-button pt-minimal pt-intent-primary pt-icon-arrow-right" {{:modifier}}></button> | |||
</div> | |||
|
|||
:disabled - Disabled input. Must be added separately to the <code><input></code> and <code><button></code>. | |||
:disabled - Disabled input. Must be added separately to the <code><input></code> and <code><button></code>. Should be used with a <code>.pt-disabled</code> modifier (not shown below). |
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.
"Also add .pt-disabled
to .pt-input-group
for icon coloring."
@@ -76,7 +76,7 @@ Markup: | |||
<input class="pt-input" {{:modifier}} type="search" placeholder="Search input" dir="auto" /> | |||
</div> | |||
|
|||
:disabled - Disabled | |||
:disabled - Disabled. This should be used with a <code>.pt-disabled</code> modifier (not shown below). |
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.
this shouldn't be necessary. disabled
attribute is sufficient for .pt-input
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.
This example includes an icon - reworded to be more obvious.
@@ -28,7 +28,7 @@ Markup: | |||
</select> | |||
</div> | |||
|
|||
:disabled - Disabled | |||
:disabled - Disabled. This should be used with a <code>.pt-disabled</code> modifier (not shown below). |
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.
"Add .pt-disabled to .pt-select for icon coloring."
updated PR title, PR description and documentation changes |
Classes.CONTROL, | ||
typeClassName, | ||
{ [Classes.DISABLED]: this.props.disabled }, | ||
this.props.className); |
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.
close paren should be on its own line, dedented back to original.
function(
args
);
@@ -343,7 +348,7 @@ $control-checked-background-color-active: nth(map-get($button-intents, "primary" | |||
</label> | |||
|
|||
:checked - Selected | |||
:disabled - Disabled | |||
:disabled - Disabled. Add <code>.pt-disabled</code> to <code>.pt-control</code> to change text color (not shown below). |
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.
"Also add..." to indicate that some additional action is suggested?
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.
add .pt-disabled
modifier to Labels markup please
Updated the |
Fixes #402
Checklist
Changes proposed in this pull request:
.pt-disabled
..pt-disabled
..pt-disabled
.:disabled
to include.pt-disabled
usage.