diff --git a/src/elements/IconButtonElement.tsx b/src/elements/IconButtonElement.tsx index 3970d72392..552c407fea 100644 --- a/src/elements/IconButtonElement.tsx +++ b/src/elements/IconButtonElement.tsx @@ -30,19 +30,29 @@ const createIconButtonElement = ({ is, id, className, title, icon, dataIndex, da }); const IconButtonElement: FunctionComponent = ({ is, id, className, title, icon, dataIndex, dataTag, dataProfileid, onClick }: IProps) => { + const button = createIconButtonElement({ + is: is, + id: id ? `id="${id}"` : '', + className: className, + title: title ? `title="${globalize.translate(title)}"` : '', + icon: icon, + dataIndex: (dataIndex || dataIndex === 0) ? `data-index="${dataIndex}"` : '', + dataTag: dataTag ? `data-tag="${dataTag}"` : '', + dataProfileid: dataProfileid ? `data-profileid="${dataProfileid}"` : '' + }); + + if (onClick !== undefined) { + return ( + + ) + } + return (
); };