diff --git a/src/components/line/index.js b/src/components/line/index.js index 05921b2e..7d687174 100644 --- a/src/components/line/index.js +++ b/src/components/line/index.js @@ -63,8 +63,40 @@ export default class Line extends PureComponent { tintColor, errorColor, focusAnimation, + disabledLineType, + lineType } = this.props; + let borderStyle = disabled ? disabledLineType : lineType; + + if (borderStyle === 'solid') { + if (disabled) { + return { + borderBottomColor: baseColor, + borderBottomWidth: disabledLineWidth, + }; + } + + if (restricted) { + return { + borderBottomColor: errorColor, + borderBottomWidth: activeLineWidth, + }; + } + + return { + borderBottomColor: focusAnimation.interpolate({ + inputRange: [-1, 0, 1], + outputRange: [errorColor, baseColor, tintColor], + }), + + borderBottomWidth: focusAnimation.interpolate({ + inputRange: [-1, 0, 1], + outputRange: [activeLineWidth, lineWidth, activeLineWidth], + }), + }; + } + if (disabled) { return { borderColor: baseColor,