Files
editor/src/components/LayerListGroup.tsx
T
Harel M 9c1499b805 Replace default export with named exports (#1998)
## Launch Checklist

See title,
Also removed some "_" from some file names.
This is a pure refactoring, no logic changes.


 - [x] Briefly describe the changes in this PR.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-07-12 14:07:28 +03:00

35 lines
1001 B
TypeScript

import React from "react";
import { Collapser } from "./Collapser";
type LayerListGroupProps = {
title: string
"data-wd-key"?: string
isActive: boolean
onActiveToggle(...args: unknown[]): unknown
"aria-controls"?: string
};
export class LayerListGroup extends React.Component<LayerListGroupProps> {
render() {
return <li className="maputnik-layer-list-group">
<div className="maputnik-layer-list-group-header"
data-wd-key={"layer-list-group:"+this.props["data-wd-key"]}
onClick={_e => this.props.onActiveToggle(!this.props.isActive)}
>
<button
className="maputnik-layer-list-group-title"
aria-controls={this.props["aria-controls"]}
aria-expanded={this.props.isActive}
>
{this.props.title}
</button>
<span className="maputnik-space" />
<Collapser
style={{ height: 14, width: 14 }}
isCollapsed={this.props.isActive}
/>
</div>
</li>;
}
}