mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 20:08:19 +00:00
change file page icons style (#6493)
* change file page icons style * change save icon style * change Open parent folder menu
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button, Tooltip } from 'reactstrap';
|
||||
import { Tooltip } from 'reactstrap';
|
||||
import Icon from './icon';
|
||||
|
||||
const propTypes = {
|
||||
@@ -28,9 +28,8 @@ class IconButton extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const className = 'btn-icon';
|
||||
const btnContent = (
|
||||
<React.Fragment>
|
||||
<>
|
||||
<Icon symbol={this.props.icon} />
|
||||
<Tooltip
|
||||
toggle={this.toggle}
|
||||
@@ -40,30 +39,30 @@ class IconButton extends React.Component {
|
||||
isOpen={this.state.tooltipOpen}>
|
||||
{this.props.text}
|
||||
</Tooltip>
|
||||
</React.Fragment>
|
||||
</>
|
||||
);
|
||||
if (this.props.tag && this.props.tag == 'a') {
|
||||
return (
|
||||
<Button
|
||||
<div
|
||||
id={this.props.id}
|
||||
className={className}
|
||||
className='file-toolbar-btn'
|
||||
tag="a"
|
||||
href={this.props.href}
|
||||
aria-label={this.props.text}
|
||||
>
|
||||
{btnContent}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Button
|
||||
<div
|
||||
id={this.props.id}
|
||||
className={className}
|
||||
className='file-toolbar-btn'
|
||||
onClick={this.props.onClick}
|
||||
aria-label={this.props.text}
|
||||
>
|
||||
{btnContent}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user