File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @netdata/netdata-ui" ,
3- "version" : " 5.0.22 " ,
3+ "version" : " 5.0.23 " ,
44 "description" : " netdata UI kit" ,
55 "main" : " dist/index.js" ,
66 "module" : " dist/es6/index.js" ,
Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ import Flex from "@/components/templates/flex"
33import { TextMicro } from "@/components/typography"
44import { Input , LabelText } from "./styled"
55
6- const ErrorMessage = ( { error } ) => {
6+ const ErrorMessage = ( { error, ... props } ) => {
77 const errorMessage = error === true ? "invalid" : error
88
99 return typeof errorMessage === "string" ? (
10- < TextMicro color = "errorText" > { errorMessage } </ TextMicro >
10+ < TextMicro color = "errorText" { ...props } >
11+ { errorMessage }
12+ </ TextMicro >
1113 ) : (
1214 ! ! errorMessage && errorMessage
1315 )
@@ -32,6 +34,7 @@ export const TextInput = ({
3234 containerStyles,
3335 inputContainerStyles,
3436 hideErrorMessage,
37+ errorMessageProps = { } ,
3538 ...props
3639} ) => {
3740 return (
@@ -70,7 +73,7 @@ export const TextInput = ({
7073 ) }
7174 </ Flex >
7275 { typeof hint === "string" ? < TextMicro color = "textLite" > { hint } </ TextMicro > : ! ! hint && hint }
73- { ! hideErrorMessage ? < ErrorMessage error = { error } /> : null }
76+ { ! hideErrorMessage ? < ErrorMessage error = { error } { ... errorMessageProps } /> : null }
7477 </ Flex >
7578 )
7679}
You can’t perform that action at this time.
0 commit comments