+
{ prefix && (
@@ -114,6 +123,10 @@ TextControlWithAffixes.propTypes = {
* Markup to be appended at the end of the input.
*/
suffix: PropTypes.node,
+ /**
+ * Whether or not the input is disabled.
+ */
+ disabled: PropTypes.bool,
};
export default withInstanceId( TextControlWithAffixes );
diff --git a/plugins/woocommerce-admin/packages/components/src/text-control-with-affixes/style.scss b/plugins/woocommerce-admin/packages/components/src/text-control-with-affixes/style.scss
index 89b825b8e80..89e8c24fcc2 100644
--- a/plugins/woocommerce-admin/packages/components/src/text-control-with-affixes/style.scss
+++ b/plugins/woocommerce-admin/packages/components/src/text-control-with-affixes/style.scss
@@ -19,23 +19,43 @@
}
}
}
+
+ &.text-control-with-prefix input {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+
+ &.text-control-with-suffix input {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
}
.text-control-with-affixes__prefix,
.text-control-with-affixes__suffix {
position: relative;
background: $studio-white;
- border: 1px solid $core-grey-light-500;
+ border-width: 1px;
+ border-style: solid;
+ border-color: $core-form-grey;
color: $gray-text;
padding: 7px 14px;
white-space: nowrap;
flex: 1 0 auto;
font-size: 14px;
line-height: 1.5;
+
+ .disabled & {
+ background: rgba(255, 255, 255, 0.5);
+ border-color: rgba(222, 222, 222, 0.75);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
+ color: rgba(51, 51, 51, 0.5);
+ }
}
.text-control-with-affixes__prefix {
border-right: none;
+ border-radius: 4px 0 0 4px;
& + input[type='email'],
& + input[type='password'],
@@ -44,11 +64,11 @@
& + input[type='number'] {
&:disabled {
border-left-color: $core-grey-light-500;
- border-right-width: 1px;
}
}
}
.text-control-with-affixes__suffix {
border-left: none;
+ border-radius: 0 4px 4px 0;
}