mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
use react children for Button and ButtonGroup
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
//@flow
|
||||
import React from "react";
|
||||
import * as React from "react";
|
||||
import classNames from "classnames";
|
||||
import { withRouter } from "react-router-dom";
|
||||
|
||||
export type ButtonProps = {
|
||||
label: string,
|
||||
label?: string,
|
||||
loading?: boolean,
|
||||
disabled?: boolean,
|
||||
action?: (event: Event) => void,
|
||||
link?: string,
|
||||
fullWidth?: boolean,
|
||||
className?: string,
|
||||
children?: React.Node,
|
||||
classes: any
|
||||
};
|
||||
|
||||
@@ -45,6 +46,7 @@ class Button extends React.Component<Props> {
|
||||
type,
|
||||
color,
|
||||
fullWidth,
|
||||
children,
|
||||
className
|
||||
} = this.props;
|
||||
const loadingClass = loading ? "is-loading" : "";
|
||||
@@ -62,7 +64,7 @@ class Button extends React.Component<Props> {
|
||||
className
|
||||
)}
|
||||
>
|
||||
{label}
|
||||
{label} {children}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user