mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Export more UI components via extensions-api (#1285)
* export more UI components via extensions-api, touches #1277 #1284 Signed-off-by: Roman <ixrock@gmail.com> * fix build, added table + notification-store exports Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
85f0ef8c2e
commit
f69f8c793f
31 files changed
+138
-120
No files matched your search
@@ -9,7 +9,10 @@ import { Button, ButtonProps } from "../button";
|
||||
import { Dialog, DialogProps } from "../dialog";
|
||||
import { Icon } from "../icon";
|
||||
|
||||
export interface IConfirmDialogParams {
|
||||
export interface ConfirmDialogProps extends Partial<DialogProps> {
|
||||
}
|
||||
|
||||
export interface ConfirmDialogParams {
|
||||
ok?: () => void;
|
||||
labelOk?: ReactNode;
|
||||
labelCancel?: ReactNode;
|
||||
@@ -19,17 +22,14 @@ export interface IConfirmDialogParams {
|
||||
cancelButtonProps?: Partial<ButtonProps>
|
||||
}
|
||||
|
||||
interface Props extends Partial<DialogProps> {
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ConfirmDialog extends React.Component<Props> {
|
||||
export class ConfirmDialog extends React.Component<ConfirmDialogProps> {
|
||||
@observable static isOpen = false;
|
||||
@observable.ref static params: IConfirmDialogParams;
|
||||
@observable.ref static params: ConfirmDialogParams;
|
||||
|
||||
@observable isSaving = false;
|
||||
|
||||
static open(params: IConfirmDialogParams) {
|
||||
static open(params: ConfirmDialogParams) {
|
||||
ConfirmDialog.isOpen = true;
|
||||
ConfirmDialog.params = params;
|
||||
}
|
||||
@@ -38,14 +38,14 @@ export class ConfirmDialog extends React.Component<Props> {
|
||||
ConfirmDialog.isOpen = false;
|
||||
}
|
||||
|
||||
public defaultParams: IConfirmDialogParams = {
|
||||
public defaultParams: ConfirmDialogParams = {
|
||||
ok: noop,
|
||||
labelOk: <Trans>Ok</Trans>,
|
||||
labelCancel: <Trans>Cancel</Trans>,
|
||||
icon: <Icon big material="warning"/>,
|
||||
};
|
||||
|
||||
get params(): IConfirmDialogParams {
|
||||
get params(): ConfirmDialogParams {
|
||||
return Object.assign({}, this.defaultParams, ConfirmDialog.params);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user