mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
error fixes
This commit is contained in:
parent
d70ebba20d
commit
823513d4ee
@ -15,14 +15,15 @@
|
||||
.error {
|
||||
display: inline-block;
|
||||
font-size: var(--font-size-mini);
|
||||
line-height: 1.2;
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--brand-white);
|
||||
background: var(--brand-alert-red);
|
||||
border-radius: var(--border-radius);
|
||||
padding: 0 0.4rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -0.75rem;
|
||||
top: 85%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@ -31,7 +32,10 @@
|
||||
}
|
||||
|
||||
.hasError input,
|
||||
.hasError input:focus,
|
||||
.hasError select,
|
||||
.hasError textarea {
|
||||
.hasError textarea,
|
||||
.hasError [class*='prefix'],
|
||||
.hasError [class*='postfix'] {
|
||||
border-color: var(--brand-alert-red);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ export default function Input(props: Partial<InputProps>): ReactElement {
|
||||
</Label>
|
||||
<InputElement small={small} {...field} {...props} />
|
||||
|
||||
{field && field.name !== 'price' && (
|
||||
{field && field.name !== 'price' && hasError && (
|
||||
<div className={styles.error}>
|
||||
<ErrorMessage name={field.name} />
|
||||
</div>
|
||||
|
@ -179,7 +179,7 @@ export default function Add({
|
||||
</div>
|
||||
|
||||
<Field name="amount">
|
||||
{({ field }: { field: any }) => (
|
||||
{({ field, form }: { field: any; form: any }) => (
|
||||
<Input
|
||||
type="number"
|
||||
max={amountMax}
|
||||
@ -196,6 +196,7 @@ export default function Add({
|
||||
}
|
||||
placeholder="0"
|
||||
field={field}
|
||||
form={form}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
|
Loading…
Reference in New Issue
Block a user