@sats-group/ui-lib 75.9.0 → 75.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -163,12 +163,19 @@
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&__help {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: spacing.$xs;
|
|
166
169
|
margin-top: spacing.$xxs;
|
|
167
170
|
color: light.$on-background-primary-disabled;
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
&__error {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: spacing.$xs;
|
|
171
177
|
margin-top: spacing.$xxs;
|
|
178
|
+
color: light.$on-surface-error;
|
|
172
179
|
}
|
|
173
180
|
|
|
174
181
|
&__asterisk {
|
|
@@ -6,6 +6,8 @@ import useInputValidation from '../use-input-validation';
|
|
|
6
6
|
|
|
7
7
|
import { themes, variants, TextInput as Props } from './text-input.types';
|
|
8
8
|
import { useEffect } from 'react';
|
|
9
|
+
import SvgError from '@sats-group/icons/16/error';
|
|
10
|
+
import SvgInfo from '@sats-group/icons/16/info';
|
|
9
11
|
|
|
10
12
|
const RefTextInput = React.forwardRef<HTMLInputElement, Props>(
|
|
11
13
|
(
|
|
@@ -97,12 +99,14 @@ const RefTextInput = React.forwardRef<HTMLInputElement, Props>(
|
|
|
97
99
|
|
|
98
100
|
{helpText ? (
|
|
99
101
|
<div className="text-input__help">
|
|
102
|
+
<SvgInfo />
|
|
100
103
|
<Text size={Text.sizes.interface}>{helpText}</Text>
|
|
101
104
|
</div>
|
|
102
105
|
) : null}
|
|
103
106
|
{/* NOTE: This is aria-hidden because reporting of validation errors is handled by the browser */}
|
|
104
107
|
{error ? (
|
|
105
108
|
<div aria-hidden="true" className="text-input__error">
|
|
109
|
+
<SvgError />
|
|
106
110
|
<Text size={Text.sizes.interface}>{error}</Text>
|
|
107
111
|
</div>
|
|
108
112
|
) : null}
|