Skip to content

Commit

Permalink
fix(input): pass sub as BaseInput child
Browse files Browse the repository at this point in the history
  • Loading branch information
reme3d2y committed Mar 3, 2020
1 parent 2314b3b commit b60d64c
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/input/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ export const Input: React.FC<InputProps> = ({
onChange={ onChange }
onFocus={ onFocus }
onBlur={ onBlur }
/>

{ hasSub && (
<span className={ cn(styles.sub) }>
{ (hasHint && !hasError) && hint }
{ hasError && error }
</span>
) }

{ children }
>
{ hasSub && (
<span className={ cn(styles.sub) }>
{ (hasHint && !hasError) && hint }
{ hasError && error }
</span>
) }
</BaseInput>
</div>
);
};

0 comments on commit b60d64c

Please sign in to comment.