Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const SubmitField = (
{ children, disabled, inputRef, label, value, ...props }: any,
{ uniforms: { error, state } },
) => (
<button value="{value}" type="submit" disabled="{disabled">
{children || label}
</button>
);
SubmitField.contextTypes = BaseField.contextTypes;
SubmitField.defaultProps = { label: 'Submit', variant: 'contained' };
export default SubmitField;
) =>
!error && !children ? (
nothing
) : (
<div>
{children}
<ul>
{schema.getErrorMessages(error).map((message, index) => (
<li>{message}</li>
))}
</ul>
</div>
);
ErrorsField.contextTypes = BaseField.contextTypes;
export default ErrorsField;
) : (
<div>
{children}
<ul>
{schema.getErrorMessages(error).map((message, index) => (
<li>{message}</li>
))}
</ul>
</div>
);
ErrorsField.contextTypes = BaseField.contextTypes;
export default ErrorsField;
!error && !children ? (
nothing
) : (
<div>
{children}
<ul>
{schema.getErrorMessages(error).map((message, index) => (
<li style="{{">
{message}
</li>
))}
</ul>
</div>
);
ErrorsField.contextTypes = BaseField.contextTypes;
ErrorsField.defaultProps = {
style: {
backgroundColor: 'rgba(255, 85, 0, 0.2)',
border: '1px solid rgb(255, 85, 0)',
borderRadius: '7px',
margin: '20px 0px',
padding: '10px',
},
};
export default ErrorsField;
<div>
{blockInput}
</div>
)}
{!hasWrap && blockInput}
);
};
SubmitField.contextTypes = BaseField.contextTypes;
SubmitField.defaultProps = { inputClassName: 'btn btn-primary' };
export default SubmitField;
const SubmitField = (
{ className, disabled, inputRef, value, ...props }: any,
{ uniforms: { error, state } },
) => (
<input value="" type="submit" disabled="{disabled">
);
SubmitField.contextTypes = BaseField.contextTypes;
export default SubmitField;
state: { disabled },
},
},
) => (
<button type="primary" disabled="{!!(error">
{value}
</button>
);
SubmitField.contextTypes = BaseField.contextTypes;
SubmitField.defaultProps = { value: 'Submit' };
export default SubmitField;
className={classnames('card border-danger mb-3 text-danger', className)}
{...filterDOMProps(props)}
>
<div>
{children}
{schema.getErrorMessages(error).map((message, index) => (
<div>
{message}
</div>
))}
</div>
);
ErrorsField.contextTypes = BaseField.contextTypes;
export default ErrorsField;
<div>
{blockInput}
</div>
)}
{!hasWrap && blockInput}
);
};
SubmitField.contextTypes = BaseField.contextTypes;
SubmitField.defaultProps = { inputClassName: 'btn btn-primary' };
export default SubmitField;
import { BaseField, filterDOMProps } from 'uniforms';
const SubmitField = (
{ disabled, inputRef, value, ...props }: any,
{ uniforms: { error, state } },
) => (
<input value="" type="submit" disabled="{disabled">
);
SubmitField.contextTypes = BaseField.contextTypes;
export default SubmitField;