-
Notifications
You must be signed in to change notification settings - Fork 37
/
SelectedValuesList.js
37 lines (34 loc) · 1.02 KB
/
SelectedValuesList.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import css from './MultiSelect.css';
const SelectedValuesList = ({
valueLabelId,
valueDescriptionId,
id,
renderSelectedItems,
listRef
}) => (
<div className={css.multiSelectValueListContainer} id={id}>
<span className="sr-only" id={valueLabelId}>
<FormattedMessage id="stripes-components.multiSelection.removeSelectedButtonLabel" />
</span>
<span className="sr-only" id={valueDescriptionId}>
<FormattedMessage id="stripes-components.multiSelection.removeSelectedButtonDescription" />
</span>
<ul
className={css.multiSelectValueList}
ref={listRef}
>
{renderSelectedItems()}
</ul>
</div>
);
SelectedValuesList.propTypes = {
id: PropTypes.string,
listRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
renderSelectedItems: PropTypes.func,
valueDescriptionId: PropTypes.string,
valueLabelId: PropTypes.string
};
export default SelectedValuesList;