nav-frontend-skjema
Advanced tools
Comparing version 1.0.35 to 1.0.36
@@ -34,5 +34,4 @@ import * as React from 'react'; | ||
toggleOutline(): () => void; | ||
renderChildren(): JSX.Element | null; | ||
render(): JSX.Element; | ||
} | ||
export default BekreftCheckboksPanel; |
@@ -15,2 +15,3 @@ "use strict"; | ||
var PT = require("prop-types"); | ||
var _1 = require("./"); | ||
@@ -39,8 +40,2 @@ var BekreftCheckboksPanel = function (_React$Component) { | ||
}, { | ||
key: "renderChildren", | ||
value: function renderChildren() { | ||
var children = this.props.children; | ||
return children ? React.createElement("div", { className: "bekreftCheckboksPanel-innhold" }, children) : null; | ||
} | ||
}, { | ||
key: "render", | ||
@@ -56,7 +51,7 @@ value: function render() { | ||
var cls = classNames('inputPanel bekreftCheckboksPanel', className, { | ||
'inputPanel--checked': checked, | ||
'inputPanel--focused': hasFocus | ||
var cls = classNames('bekreftCheckboksPanel', className, { | ||
'bekreftCheckboksPanel--checked': checked, | ||
'bekreftCheckboksPanel--focus': hasFocus | ||
}); | ||
return React.createElement("div", { className: cls }, this.renderChildren(), React.createElement("label", { className: "inputPanel__label" }, React.createElement("input", Object.assign({}, inputProps, { className: "inputPanel__field", type: "checkbox", checked: checked, "aria-checked": checked, onFocus: this.toggleOutline(), onBlur: this.toggleOutline(), onChange: onChange })), React.createElement("span", { className: "inputPanel__textlabel" }, label))); | ||
return React.createElement("div", { className: cls }, this.props.children && React.createElement("div", { className: "bekreftCheckboksPanel__innhold" }, this.props.children), React.createElement(_1.Checkbox, Object.assign({}, inputProps, { label: label, checked: checked, "aria-checked": checked, onFocus: this.toggleOutline(), onBlur: this.toggleOutline(), onChange: onChange }))); | ||
} | ||
@@ -63,0 +58,0 @@ }]); |
{ | ||
"name": "nav-frontend-skjema", | ||
"version": "1.0.35", | ||
"version": "1.0.36", | ||
"main": "lib/index.js", | ||
@@ -18,3 +18,3 @@ "types": "lib/index.d.ts", | ||
"nav-frontend-js-utils": "^1.0.6", | ||
"nav-frontend-skjema-style": "^1.0.16", | ||
"nav-frontend-skjema-style": "^1.0.17", | ||
"prop-types": "^15.5.10", | ||
@@ -26,3 +26,3 @@ "react": "^15.4.2 || ^16.0.0" | ||
"nav-frontend-js-utils": "^1.0.6", | ||
"nav-frontend-skjema-style": "^1.0.16", | ||
"nav-frontend-skjema-style": "^1.0.17", | ||
"prop-types": "^15.5.10", | ||
@@ -29,0 +29,0 @@ "react": "^15.4.2 || ^16.0.0" |
Sorry, the diff of this file is not supported yet
221211
2933