graphen 1.10.0 → 1.10.2
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/scripts.js +1 -1
- package/package.json +1 -1
- package/src/components/Dropdown/index.tsx +8 -3
- package/dist/example.js +0 -2
- package/dist/example.js.LICENSE.txt +0 -44
- package/dist/styles.css +0 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import classNames from "classnames";
|
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
6
6
|
initValue: Readonly<{ value: string, label: string }>,
|
|
7
|
-
label
|
|
7
|
+
label?: string,
|
|
8
8
|
items: ReadonlyArray<{ value: string, label: string }>,
|
|
9
9
|
onChange: (arg0: string) => void,
|
|
10
10
|
};
|
|
@@ -27,9 +27,9 @@ function Dropdown(props: Props) {
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<div className="gc-dropdown">
|
|
30
|
-
<label className="gc-dropdown__label" htmlFor="gc-dropdown__label">
|
|
30
|
+
{label && (<label className="gc-dropdown__label" htmlFor="gc-dropdown__label">
|
|
31
31
|
{label}
|
|
32
|
-
</label>
|
|
32
|
+
</label>)}
|
|
33
33
|
<div className="gc-dropdown__menu">
|
|
34
34
|
<button
|
|
35
35
|
type="button"
|
|
@@ -69,4 +69,9 @@ function Dropdown(props: Props) {
|
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
Dropdown.defaultProps = {
|
|
74
|
+
label: undefined,
|
|
75
|
+
};
|
|
76
|
+
|
|
72
77
|
export default Dropdown;
|