@hellobetterdigitalnz/betterui 0.0.3-337 → 0.0.3-338

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.
@@ -1,33 +1,33 @@
1
- import DropdownFieldItemProps from "./DropdownFieldItemProps";
2
- import styles from './dropdown.module.scss'
3
- import {MouseEvent} from "react";
4
-
5
- const DropdownFieldItem = (props: DropdownFieldItemProps) => {
6
- const {
7
- label,
8
- value,
9
- icon,
10
- handleSelect
11
- } = props;
12
-
13
- return <div
14
- className={styles.dropdownItem}
15
- data-value={value} aria-label={label}
16
- onClick={(e: MouseEvent) => {
17
- e.stopPropagation();
18
- if (handleSelect) {
19
- handleSelect(e, value);
20
- }
21
- }}
22
- >
23
- {icon && (
24
- <div className={styles.itemIcon}>
25
- {icon}
26
- </div>
27
- )}
28
- {label}
29
- </div>
30
-
31
- }
32
-
33
- export default DropdownFieldItem;
1
+ import DropdownFieldItemProps from "./DropdownFieldItemProps";
2
+ import styles from './dropdown.module.scss'
3
+ import {MouseEvent} from "react";
4
+
5
+ const DropdownFieldItem = (props: DropdownFieldItemProps) => {
6
+ const {
7
+ label,
8
+ value,
9
+ icon,
10
+ handleSelect
11
+ } = props;
12
+
13
+ return <div
14
+ className={styles.dropdownItem}
15
+ data-value={value} aria-label={label}
16
+ onClick={(e: MouseEvent) => {
17
+ e.stopPropagation();
18
+ if (handleSelect) {
19
+ handleSelect(e, value);
20
+ }
21
+ }}
22
+ >
23
+ {icon && (
24
+ <div className={styles.itemIcon}>
25
+ {icon}
26
+ </div>
27
+ )}
28
+ {label}
29
+ </div>
30
+
31
+ }
32
+
33
+ export default DropdownFieldItem;