aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Icon.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-05-31 06:10:51 +0300
committerGravatar Vitaly Takmazov2023-05-31 06:11:05 +0300
commitf2a7ea3af919548d41383734e8a3667086a44bcc (patch)
treee0d9db07956f10ccc4e27fc9e0d45d88950dbfbb /vnext/src/ui/Icon.js
parent395185d093b2d6bb46d02830088e00a3a2ca20c1 (diff)
eslint: enforce semicolons only before statement continuation chars
Diffstat (limited to 'vnext/src/ui/Icon.js')
-rw-r--r--vnext/src/ui/Icon.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/vnext/src/ui/Icon.js b/vnext/src/ui/Icon.js
index 6d10df16..bc5ce08a 100644
--- a/vnext/src/ui/Icon.js
+++ b/vnext/src/ui/Icon.js
@@ -1,7 +1,7 @@
-import { createElement, memo } from 'react';
-import PropTypes from 'prop-types';
+import { createElement, memo } from 'react'
+import PropTypes from 'prop-types'
-import evilIcons from 'evil-icons/assets/sprite.svg';
+import evilIcons from 'evil-icons/assets/sprite.svg'
/**
* @typedef {object} IconProps
@@ -16,18 +16,18 @@ import evilIcons from 'evil-icons/assets/sprite.svg';
* @param {IconProps} props - icon props
*/
function IconElement(props) {
- var size = props.size ? ' icon--' + props.size : '';
- var className = props.className ? ' ' + props.className : '';
- var klass = 'icon' + (!props.noFill ? ' icon--' + props.name : '') + size + className;
+ var size = props.size ? ' icon--' + props.size : ''
+ var className = props.className ? ' ' + props.className : ''
+ var klass = 'icon' + (!props.noFill ? ' icon--' + props.name : '') + size + className
- var name = '#' + props.name + '-icon';
- var useTag = `<use xlink:href='${evilIcons}${name}' />`;
- var Icon = createElement('svg', { className: 'icon__cnt', dangerouslySetInnerHTML: { __html: useTag } });
+ var name = '#' + props.name + '-icon'
+ var useTag = `<use xlink:href='${evilIcons}${name}' />`
+ var Icon = createElement('svg', { className: 'icon__cnt', dangerouslySetInnerHTML: { __html: useTag } })
return createElement(
'div',
{ className: klass },
wrapSpinner(Icon, klass)
- );
+ )
}
/**
@@ -40,17 +40,17 @@ function wrapSpinner(Html, klass) {
'div',
{ className: 'icon__spinner' },
Html
- );
+ )
} else {
- return Html;
+ return Html
}
}
-export default memo(IconElement);
+export default memo(IconElement)
IconElement.propTypes = {
size: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
className: PropTypes.string,
noFill: PropTypes.bool
-};
+}