@utrecht/form-label-css 3.0.0 → 3.0.1
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/CHANGELOG.md +6 -0
- package/package.json +3 -2
- package/src/story-template.jsx +0 -58
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.0.
|
|
2
|
+
"version": "3.0.1",
|
|
3
3
|
"author": "Community for NL Design System",
|
|
4
4
|
"description": "Form label component for the Municipality of Utrecht based on the NL Design System architecture",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"nl-design-system"
|
|
19
19
|
],
|
|
20
20
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
21
|
+
"access": "public",
|
|
22
|
+
"provenance": true
|
|
22
23
|
},
|
|
23
24
|
"repository": {
|
|
24
25
|
"type": "git+ssh",
|
package/src/story-template.jsx
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c) 2020-2024 Frameless B.V.
|
|
4
|
-
* Copyright (c) 2021-2024 Gemeente Utrecht
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import clsx from 'clsx';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
export const argTypes = {
|
|
11
|
-
textContent: {
|
|
12
|
-
description: 'Set the content of the label',
|
|
13
|
-
control: 'text',
|
|
14
|
-
},
|
|
15
|
-
type: {
|
|
16
|
-
description: 'Set the type of the form control',
|
|
17
|
-
options: ['default', 'checkbox', 'radio'],
|
|
18
|
-
control: { type: 'radio' },
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const defaultArgs = {
|
|
23
|
-
checked: false,
|
|
24
|
-
disabled: false,
|
|
25
|
-
textContent: '',
|
|
26
|
-
type: null,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const exampleArgs = {
|
|
30
|
-
textContent: 'Username',
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const FormLabel = ({
|
|
34
|
-
checked = defaultArgs.checked,
|
|
35
|
-
disabled = defaultArgs.disabled,
|
|
36
|
-
textContent = defaultArgs.textContent,
|
|
37
|
-
type = defaultArgs.type,
|
|
38
|
-
className,
|
|
39
|
-
children,
|
|
40
|
-
...restProps
|
|
41
|
-
}) => (
|
|
42
|
-
<label
|
|
43
|
-
{...restProps}
|
|
44
|
-
className={clsx(
|
|
45
|
-
'utrecht-form-label',
|
|
46
|
-
type === 'checkbox' && 'utrecht-form-label--checkbox',
|
|
47
|
-
checked && 'utrecht-form-label--checked',
|
|
48
|
-
disabled && 'utrecht-form-label--disabled',
|
|
49
|
-
type === 'radio' && 'utrecht-form-label--radio',
|
|
50
|
-
className,
|
|
51
|
-
)}
|
|
52
|
-
>
|
|
53
|
-
{textContent}
|
|
54
|
-
{children}
|
|
55
|
-
</label>
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
export default FormLabel;
|