mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-18 17:32:27 +01:00
Details HTML element for About page Section component
This commit is contained in:
parent
eae5c7334a
commit
edbbb48015
2 changed files with 10 additions and 7 deletions
|
@ -74,15 +74,13 @@ class Section extends PureComponent {
|
|||
const { collapsed } = this.state;
|
||||
|
||||
return (
|
||||
<div className={classNames('about__section', { active: !collapsed })}>
|
||||
<div className='about__section__title' role='button' tabIndex={0} onClick={this.handleClick}>
|
||||
<details open={!collapsed} onOpen={this.handleClick} className={classNames('about__section', { active: !collapsed })}>
|
||||
<summary className='about__section__title'>
|
||||
<Icon id={collapsed ? 'chevron-right' : 'chevron-down'} icon={collapsed ? ChevronRightIcon : ExpandMoreIcon} /> {title}
|
||||
</div>
|
||||
</summary>
|
||||
|
||||
{!collapsed && (
|
||||
<div className='about__section__body'>{children}</div>
|
||||
)}
|
||||
</div>
|
||||
</details>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -9146,6 +9146,11 @@ noscript {
|
|||
background: lighten($ui-base-color, 4%);
|
||||
color: $highlight-text-color;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
&__title::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.active &__title {
|
||||
|
|
Loading…
Reference in a new issue