dibk-design 0.4.26 → 0.4.30
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/dist/components/DragAndDropFileInput.md +3 -1
- package/dist/components/DragAndDropFileInput.module.scss +10 -1
- package/dist/components/InputField.js +4 -3
- package/dist/components/InputField.module.scss +1 -0
- package/dist/components/Select.module.scss +1 -0
- package/dist/components/Textarea.module.scss +5 -1
- package/package.json +1 -1
|
@@ -7,5 +7,7 @@ Drag and drop file input examples:
|
|
|
7
7
|
|
|
8
8
|
<DragAndDropFileInput id="dragAndDropInput-3" label="Input with selected file and buttonContentWhenSelectedFile" buttonContent="Velg fil" buttonContentWhenSelectedFile="Velg annen fil" selectedFileName="important-file.xml" onSelectChange={() => console.log('Select change')} onDragAndDropChange={() => console.log('Drag and drop change')} />
|
|
9
9
|
|
|
10
|
-
<DragAndDropFileInput id="dragAndDropInput-4" label="Input with selected file and
|
|
10
|
+
<DragAndDropFileInput id="dragAndDropInput-4" label="Input with selected file and error message" buttonContent="Velg fil" buttonContentWhenSelectedFile="Velg annen fil" selectedFileName="wrong-file.xml" onSelectChange={() => console.log('Select change')} onDragAndDropChange={() => console.log('Drag and drop change')} hasErrors errorMessage="Filen må være midre enn 15MB" />
|
|
11
|
+
|
|
12
|
+
<DragAndDropFileInput id="dragAndDropInput-5" label="Input with selected file and contentOnly" buttonContent="Velg fil" selectedFileName="important-file2.xml" onSelectChange={() => console.log('Select change')} onDragAndDropChange={() => console.log('Drag and drop change')} contentOnly={true} />
|
|
11
13
|
```
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
font-size: 18px;
|
|
7
7
|
margin: 0 0 4px;
|
|
8
|
-
font-family: "Open Sans",arial,sans-serif;
|
|
8
|
+
font-family: "Open Sans", arial, sans-serif;
|
|
9
9
|
line-height: 1.3;
|
|
10
10
|
font-weight: bold;
|
|
11
11
|
font-style: normal;
|
|
@@ -33,4 +33,13 @@
|
|
|
33
33
|
border-color: $color-dark-blue;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
:local(.errorMessage) {
|
|
37
|
+
color: $color-error-text;
|
|
38
|
+
font-size: 19px;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
line-height: 1.6;
|
|
41
|
+
font-family: "Open Sans", sans-serif;
|
|
42
|
+
font-style: italic;
|
|
43
|
+
overflow-wrap: break-word;
|
|
44
|
+
}
|
|
36
45
|
}
|
|
@@ -85,10 +85,11 @@ class InputField extends _react.default.Component {
|
|
|
85
85
|
onBlur: this.props.onBlur ? date => this.props.onBlur(date) : null,
|
|
86
86
|
selected: value ? new Date(value) : null,
|
|
87
87
|
placeholderText: this.props.placeholder,
|
|
88
|
-
className: this.props.hasErrors ? _InputFieldModule.default.hasErrors : ''
|
|
89
|
-
style: styleRules
|
|
88
|
+
className: this.props.hasErrors ? _InputFieldModule.default.hasErrors : ''
|
|
90
89
|
};
|
|
91
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
style: styleRules
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_reactDatepicker.default, props));
|
|
92
93
|
} else {
|
|
93
94
|
const defaultValue = !this.props.value && this.props.defaultValue ? this.props.defaultValue : false;
|
|
94
95
|
const props = {
|