qpp-style 9.28.2-mo-beta.0 → 9.28.3-mo-beta.0
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/components/Accordion/index.jsx +1 -5
- package/components/SideNav/Content/SelectRole/index.js +18 -10
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/_accordion.scss +0 -7
|
@@ -38,9 +38,7 @@ const Accordion = (props) => {
|
|
|
38
38
|
return (
|
|
39
39
|
<div className="accordion-section" data-testid="accordion">
|
|
40
40
|
<button
|
|
41
|
-
className={`accordion ${setActive}
|
|
42
|
-
setActive && props.isSticky ? 'sticky' : ''
|
|
43
|
-
}`}
|
|
41
|
+
className={`accordion ${setActive}`}
|
|
44
42
|
aria-label={props.title}
|
|
45
43
|
aria-pressed={ariaPressed}
|
|
46
44
|
aria-expanded={ariaPressed}
|
|
@@ -85,13 +83,11 @@ Accordion.propTypes = {
|
|
|
85
83
|
centerItem: PropTypes.string,
|
|
86
84
|
rightItem: PropTypes.string,
|
|
87
85
|
isOpen: PropTypes.bool,
|
|
88
|
-
isSticky: PropTypes.bool,
|
|
89
86
|
};
|
|
90
87
|
|
|
91
88
|
Accordion.defaultProps = {
|
|
92
89
|
title: '',
|
|
93
90
|
isOpen: false,
|
|
94
|
-
isSticky: false,
|
|
95
91
|
};
|
|
96
92
|
|
|
97
93
|
export default Accordion;
|
|
@@ -54,18 +54,26 @@ const SelectRole = ({ selectedRole, setSelectedRole }) => {
|
|
|
54
54
|
}
|
|
55
55
|
}, []);
|
|
56
56
|
|
|
57
|
+
const singleRoleUser = ROLE_OPTIONS.length === 1;
|
|
58
|
+
|
|
59
|
+
const MultiRoleDropdown = () => (
|
|
60
|
+
<Dropdown
|
|
61
|
+
value={selectedRole}
|
|
62
|
+
name="user-role-selection"
|
|
63
|
+
ariaLabel="Select User Role"
|
|
64
|
+
className="qpp-u-width--100 SelectRole__Dropdown"
|
|
65
|
+
options={ROLE_OPTIONS}
|
|
66
|
+
onChange={handleSelection}
|
|
67
|
+
disabled={isHelpdeskRoleAndImpersonating}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
|
|
57
71
|
return (
|
|
58
72
|
<div className="SelectRole__Container">
|
|
59
|
-
<p className="SelectRole__Text">
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
ariaLabel="Select User Role"
|
|
64
|
-
className="qpp-u-width--100 SelectRole__Dropdown"
|
|
65
|
-
options={ROLE_OPTIONS}
|
|
66
|
-
onChange={handleSelection}
|
|
67
|
-
disabled={isHelpdeskRoleAndImpersonating}
|
|
68
|
-
/>
|
|
73
|
+
<p className="SelectRole__Text">
|
|
74
|
+
You are viewing as a{singleRoleUser ? ` ${selectedRole}` : ''}
|
|
75
|
+
</p>
|
|
76
|
+
{!singleRoleUser && <MultiRoleDropdown />}
|
|
69
77
|
</div>
|
|
70
78
|
);
|
|
71
79
|
};
|