mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
refactor(ActionButton): remove dead code
This commit is contained in:
parent
3dbcff6fb9
commit
4df2c4c9ca
1 changed files with 3 additions and 4 deletions
|
|
@ -8,9 +8,9 @@ const { Button } = require('stremio/components');
|
|||
const styles = require('./styles');
|
||||
const { Tooltip } = require('stremio/common/Tooltips');
|
||||
|
||||
const ActionButton = ({ className, icon, label, tooltip, showLabel = true, ...props }) => {
|
||||
const ActionButton = ({ className, icon, label, tooltip, ...props }) => {
|
||||
return (
|
||||
<Button title={tooltip ? '' : label} {...props} className={classnames(className, styles['action-button-container'], { 'wide': typeof label === 'string' && !tooltip && showLabel })}>
|
||||
<Button title={tooltip ? '' : label} {...props} className={classnames(className, styles['action-button-container'], { 'wide': typeof label === 'string' && !tooltip })}>
|
||||
{
|
||||
tooltip === true ?
|
||||
<Tooltip label={label} position={'top'} />
|
||||
|
|
@ -26,7 +26,7 @@ const ActionButton = ({ className, icon, label, tooltip, showLabel = true, ...pr
|
|||
null
|
||||
}
|
||||
{
|
||||
!tooltip && typeof label === 'string' && label.length > 0 && showLabel ?
|
||||
!tooltip && typeof label === 'string' && label.length > 0 ?
|
||||
<div className={styles['label-container']}>
|
||||
<div className={styles['label']}>{label}</div>
|
||||
</div>
|
||||
|
|
@ -42,7 +42,6 @@ ActionButton.propTypes = {
|
|||
icon: PropTypes.string,
|
||||
label: PropTypes.string,
|
||||
tooltip: PropTypes.bool,
|
||||
showLabel: PropTypes.bool
|
||||
};
|
||||
|
||||
module.exports = ActionButton;
|
||||
|
|
|
|||
Loading…
Reference in a new issue