collapsed: PropTypes.bool,
onExpandedToggle: PropTypes.func,
media: PropTypes.node,
- mediaIcon: PropTypes.string,
+ mediaIcons: PropTypes.arrayOf(PropTypes.string),
parseClick: PropTypes.func,
disabled: PropTypes.bool,
onUpdate: PropTypes.func,
const {
status,
media,
- mediaIcon,
+ mediaIcons,
parseClick,
disabled,
tagLinks,
key='0'
/>,
];
- if (mediaIcon) {
- toggleText.push(
- <Icon
- fixedWidth
- className='status__content__spoiler-icon'
- id={mediaIcon}
- aria-hidden='true'
- key='1'
- />,
- );
+ if (mediaIcons) {
+ mediaIcons.forEach((mediaIcon, idx) => {
+ toggleText.push(
+ <Icon
+ fixedWidth
+ className='status__content__spoiler-icon'
+ id={mediaIcon}
+ aria-hidden='true'
+ key={`icon-${idx}`}
+ />,
+ );
+ });
}
} else {
toggleText = (