generated from Exabyte-io/template-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from Exabyte-io/update/SOF-7411
SOF-7411: Minor dialog changes
- Loading branch information
Showing
45 changed files
with
7,482 additions
and
3,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { enqueueSnackbar } from "notistack"; | ||
import { useCallback } from "react"; | ||
import { showSuccessAlert } from "../other/alerts"; | ||
import { copyToClipboard } from "../utils/clipboard"; | ||
export const useCopyToClipboard = () => { | ||
return useCallback((textToCopy, content) => { | ||
copyToClipboard(textToCopy, () => { | ||
enqueueSnackbar(content, { variant: "success" }); | ||
showSuccessAlert(content); | ||
}); | ||
}, []); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
dist/mui/components/custom/date-picker/DatePicker.styled.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export declare const DatePickerButtonsContainer: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledPopover: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledDatePicker: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
export declare const StyledDatePickerContainer: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>; | ||
/// <reference types="react" /> | ||
import { Theme } from "@mui/material/styles"; | ||
export declare const DatePickerButtonsContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; | ||
export declare const StyledPopover: import("@emotion/styled").StyledComponent<import("@mui/material/Popover").PopoverProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>; | ||
export declare const StyledDatePicker: import("@emotion/styled").StyledComponent<import("@mui/x-date-pickers/DatePicker").DatePickerProps<unknown> & import("react").RefAttributes<HTMLDivElement> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>; | ||
export declare const StyledDatePickerContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export declare function showSuccessAlert(message: string): void; | ||
export declare function showErrorAlert(message: string): void; | ||
export declare function showWarningAlert(message: string): void; | ||
export declare function showInfoAlert(message: string): void; | ||
export declare function showAlert(message: string, type: "info" | "warning" | "error" | "success"): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { enqueueSnackbar } from "notistack"; | ||
const anchorOrigin = { | ||
vertical: "bottom", | ||
horizontal: "left", | ||
}; | ||
export function showSuccessAlert(message) { | ||
enqueueSnackbar(message, { variant: "success", anchorOrigin }); | ||
} | ||
export function showErrorAlert(message) { | ||
enqueueSnackbar(message, { variant: "error", anchorOrigin }); | ||
} | ||
export function showWarningAlert(message) { | ||
enqueueSnackbar(message, { variant: "warning", anchorOrigin }); | ||
} | ||
export function showInfoAlert(message) { | ||
enqueueSnackbar(message, { variant: "info", anchorOrigin }); | ||
} | ||
export function showAlert(message, type) { | ||
switch (type) { | ||
case "warning": | ||
showWarningAlert(message); | ||
break; | ||
case "error": | ||
showErrorAlert(message); | ||
break; | ||
case "success": | ||
showSuccessAlert(message); | ||
break; | ||
case "info": | ||
showInfoAlert(message); | ||
break; | ||
default: | ||
showInfoAlert(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { FormProps } from "@rjsf/core"; | ||
import { RJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function RJSFForm(props: FormProps<any, RJSFSchema, any>): React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Form from "@rjsf/mui"; | ||
import React from "react"; | ||
import ArrayFieldItemTemplate from "./templates/ArrayFieldItemTemplate"; | ||
import ArrayFieldTemplate from "./templates/ArrayFieldTemplate"; | ||
import BaseInputTemplate from "./templates/BaseInputTemplate"; | ||
import ObjectFieldTemplate from "./templates/ObjectFieldTemplate"; | ||
import TitleFieldTemplate from "./templates/TitleFieldTemplate"; | ||
import SelectWidget from "./widgets/SelectWidget"; | ||
export default function RJSFForm(props) { | ||
return (React.createElement(Form, { ...props, templates: { | ||
ObjectFieldTemplate, | ||
BaseInputTemplate, | ||
ArrayFieldTemplate, | ||
ArrayFieldItemTemplate, | ||
TitleFieldTemplate, | ||
}, widgets: { SelectWidget } })); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { FormProps } from "@rjsf/core"; | ||
import { RJSFSchema } from "@rjsf/utils"; | ||
import React from "react"; | ||
export default function RJSForm({ widgets, templates, ...props }: FormProps<any, RJSFSchema, any>): React.JSX.Element; |
Oops, something went wrong.