Skip to content

Commit cb3610d

Browse files
author
Jonas Gossens
committed
🎨 Remove chayns.utils.isString from accordion
1 parent 9c491bd commit cb3610d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/react-chayns-accordion/component/Accordion.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export default class Accordion extends PureComponent {
317317
})}
318318
>
319319
{
320-
chayns.utils.isString(icon) || icon.iconName
320+
typeof icon === 'string' || icon.iconName
321321
? <Icon icon={icon} />
322322
: icon
323323
}
@@ -328,7 +328,7 @@ export default class Accordion extends PureComponent {
328328
className="accordion__head__title"
329329
style={{
330330
...(noIcon ? { paddingLeft: '10px' } : null),
331-
...(head && !chayns.utils.isString(head.open) && chayns.utils.isString(head.close) && isWrapped ? { fontWeight: 'inherit' } : null),
331+
...(head && typeof head.open !== 'string' && typeof head.close === 'string' && isWrapped ? { fontWeight: 'inherit' } : null),
332332
}}
333333
>
334334
{/* eslint-disable-next-line no-nested-ternary */}

0 commit comments

Comments
 (0)