mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
Add className option to ConfirmAlert
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import Modal from "./Modal";
|
import Modal from "./Modal";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
type Button = {
|
type Button = {
|
||||||
|
className?: string;
|
||||||
label: string;
|
label: string;
|
||||||
onClick: () => void | null;
|
onClick: () => void | null;
|
||||||
};
|
};
|
||||||
@@ -37,7 +39,7 @@ class ConfirmAlert extends React.Component<Props> {
|
|||||||
<div className="field is-grouped">
|
<div className="field is-grouped">
|
||||||
{buttons.map((button, i) => (
|
{buttons.map((button, i) => (
|
||||||
<p className="control">
|
<p className="control">
|
||||||
<a className="button is-info" key={i} onClick={() => this.handleClickButton(button)}>
|
<a className={classNames("button", "is-info", button.className)} key={i} onClick={() => this.handleClickButton(button)}>
|
||||||
{button.label}
|
{button.label}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user