blob: ac4daa41970cb8117317b0d11b0a3e34552f5d8b [file] [log] [blame]
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { Component } from 'react';
import { Nav, NavItem, NavLink, Progress, TabContent, TabPane, ListGroup, ListGroupItem } from 'reactstrap';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { AppSwitch } from '@coreui/react'
const propTypes = {
children: PropTypes.node,
};
const defaultProps = {};
class DefaultAside extends Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
activeTab: '1',
};
}
toggle(tab) {
if (this.state.activeTab !== tab) {
this.setState({
activeTab: tab,
});
}
}
render() {
// eslint-disable-next-line
const { children, ...attributes } = this.props;
return (
<React.Fragment>
<Nav tabs>
<NavItem>
<NavLink className={classNames({ active: this.state.activeTab === '1' })}
onClick={() => {
this.toggle('1');
}}>
<i className="icon-list"></i>
</NavLink>
</NavItem>
<NavItem>
<NavLink className={classNames({ active: this.state.activeTab === '2' })}
onClick={() => {
this.toggle('2');
}}>
<i className="icon-speech"></i>
</NavLink>
</NavItem>
<NavItem>
<NavLink className={classNames({ active: this.state.activeTab === '3' })}
onClick={() => {
this.toggle('3');
}}>
<i className="icon-settings"></i>
</NavLink>
</NavItem>
</Nav>
<TabContent activeTab={this.state.activeTab}>
<TabPane tabId="1">
</TabPane>
<TabPane tabId="2" className="p-3">
</TabPane>
</TabContent>
</React.Fragment>
);
}
}
DefaultAside.propTypes = propTypes;
DefaultAside.defaultProps = defaultProps;
export default DefaultAside;