mirror of
https://github.com/maputnik/editor.git
synced 2026-07-14 01:47:27 +00:00
9c1499b805
## 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>
34 lines
856 B
TypeScript
34 lines
856 B
TypeScript
import React from "react";
|
|
import classnames from "classnames";
|
|
|
|
type InputButtonProps = {
|
|
"data-wd-key"?: string
|
|
"aria-label"?: string
|
|
onClick?(...args: unknown[]): unknown
|
|
style?: object
|
|
className?: string
|
|
children?: React.ReactNode
|
|
disabled?: boolean
|
|
type?: typeof HTMLButtonElement.prototype.type
|
|
id?: string
|
|
title?: string
|
|
};
|
|
|
|
export class InputButton extends React.Component<InputButtonProps> {
|
|
render() {
|
|
return <button
|
|
id={this.props.id}
|
|
title={this.props.title}
|
|
type={this.props.type}
|
|
onClick={this.props.onClick}
|
|
disabled={this.props.disabled}
|
|
aria-label={this.props["aria-label"]}
|
|
className={classnames("maputnik-button", this.props.className)}
|
|
data-wd-key={this.props["data-wd-key"]}
|
|
style={this.props.style}
|
|
>
|
|
{this.props.children}
|
|
</button>;
|
|
}
|
|
}
|