* client: accordion styles
This commit is contained in:
parent
b92fb34f37
commit
6ba0e4686a
|
@ -1,9 +1,13 @@
|
||||||
|
.accordion {
|
||||||
|
color: #495057;
|
||||||
|
}
|
||||||
|
|
||||||
.accordion__label {
|
.accordion__label {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
color: #495057;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion__label:after {
|
.accordion__label:after {
|
||||||
|
@ -25,5 +29,4 @@
|
||||||
|
|
||||||
.accordion__content {
|
.accordion__content {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
color: #495057;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,14 @@ class Accordion extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const accordionClass = this.state.isOpen ? 'accordion__label--open' : '';
|
const accordionClass = this.state.isOpen
|
||||||
|
? 'accordion__label accordion__label--open'
|
||||||
|
: 'accordion__label';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="accordion">
|
<div className="accordion">
|
||||||
<div
|
<div
|
||||||
className={`accordion__label ${accordionClass}`}
|
className={accordionClass}
|
||||||
onClick={this.handleClick}
|
onClick={this.handleClick}
|
||||||
>
|
>
|
||||||
{this.props.label}
|
{this.props.label}
|
||||||
|
|
Loading…
Reference in New Issue