Skip to content

Commit

Permalink
Make the progress message configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 30, 2024
1 parent 5d231ca commit bc2cd45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/components/core/Popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,16 @@ const AncillaryAction = ({ children, ...actionsProps }) => (
* @property {"auto" | "small" | "medium" | "large"} [blockSize="auto"] - The block/height size for the dialog. Default is "auto".
* @property {"auto" | "small" | "medium" | "large"} [inlineSize="medium"] - The inline/width size for the dialog. Default is "medium".
* @property {boolean} [isLoading=false] - Whether the data is loading, if yes it displays a loading indicator instead of the requested content
* @property {string} [loadingText="Loading data..."] - Text displayed when `isLoading` is set to `true`
* @typedef {Omit<ModalProps, "variant" | "size"> & PopupBaseProps} PopupProps
*
* @param {PopupProps} props
*/
const Popup = ({
isOpen = false,
isLoading = false,
// TRANSLATORS: progress message
loadingText = _("Loading data..."),
showClose = false,
inlineSize = "medium",
blockSize = "auto",
Expand All @@ -217,7 +220,7 @@ const Popup = ({
actions={actions}
className={`${className} block-size-${blockSize} inline-size-${inlineSize}`.trim()}
>
{isLoading ? <Loading text={_("Loading data...")} /> : content}
{isLoading ? <Loading text={loadingText} /> : content}
</Modal>
);
};
Expand Down

0 comments on commit bc2cd45

Please sign in to comment.