@chakra-ui/form-control
Advanced tools
Comparing version 1.3.5 to 1.3.6
# Change Log | ||
## 1.3.6 | ||
### Patch Changes | ||
- [`620f0b7d7`](https://github.com/chakra-ui/chakra-ui/commit/620f0b7d756ffb6bfc6ddf0459e96f774ffbb9be) | ||
Thanks [@segunadebayo](https://github.com/segunadebayo)! - Fix issue where | ||
FormLabel could not be used without form-control | ||
## 1.3.5 | ||
@@ -4,0 +12,0 @@ |
@@ -31,2 +31,4 @@ "use strict"; | ||
var FormLabel = /*#__PURE__*/(0, _system.forwardRef)(function (passedProps, ref) { | ||
var _field$getLabelProps; | ||
var styles = (0, _system.useStyleConfig)("FormLabel", passedProps); | ||
@@ -42,3 +44,6 @@ var props = (0, _system.omitThemingProps)(passedProps); | ||
var field = (0, _formControl.useFormControlContext)(); | ||
return /*#__PURE__*/React.createElement(_system.chakra.label, _extends({}, field == null ? void 0 : field.getLabelProps(rest, ref), { | ||
var ownProps = (_field$getLabelProps = field == null ? void 0 : field.getLabelProps(rest, ref)) != null ? _field$getLabelProps : _extends({ | ||
ref: ref | ||
}, rest); | ||
return /*#__PURE__*/React.createElement(_system.chakra.label, _extends({}, ownProps, { | ||
className: (0, _utils.cx)("chakra-form__label", props.className), | ||
@@ -45,0 +50,0 @@ __css: _extends({ |
@@ -19,2 +19,4 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
export var FormLabel = /*#__PURE__*/forwardRef((passedProps, ref) => { | ||
var _field$getLabelProps; | ||
var styles = useStyleConfig("FormLabel", passedProps); | ||
@@ -30,3 +32,6 @@ var props = omitThemingProps(passedProps); | ||
var field = useFormControlContext(); | ||
return /*#__PURE__*/React.createElement(chakra.label, _extends({}, field == null ? void 0 : field.getLabelProps(rest, ref), { | ||
var ownProps = (_field$getLabelProps = field == null ? void 0 : field.getLabelProps(rest, ref)) != null ? _field$getLabelProps : _extends({ | ||
ref | ||
}, rest); | ||
return /*#__PURE__*/React.createElement(chakra.label, _extends({}, ownProps, { | ||
className: cx("chakra-form__label", props.className), | ||
@@ -33,0 +38,0 @@ __css: _extends({ |
{ | ||
"name": "@chakra-ui/form-control", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "React component to provide validation states to form fields", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@chakra-ui/system": "1.6.5", | ||
"@chakra-ui/system": "1.6.6", | ||
"react": "^17.0.1" | ||
@@ -67,0 +67,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121395
993