mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Updated components build.
This commit is contained in:
parent
5f27ba149b
commit
56af91950a
53 changed files with 942 additions and 333 deletions
|
|
@ -59,7 +59,6 @@ export function DataGrid({
|
|||
delay={searchDelay || DEFAULT_SEARCH_DELAY}
|
||||
autoFocus={autoFocus}
|
||||
placeholder={formatMessage(labels.search)}
|
||||
style={{ width: '280px' }}
|
||||
/>
|
||||
{renderActions?.()}
|
||||
</Row>
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
.error {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
z-index: var(--z-index-overlay);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 600px;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.error button {
|
||||
align-self: center;
|
||||
}
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
import { ErrorInfo, ReactNode } from 'react';
|
||||
import { ErrorBoundary as Boundary } from 'react-error-boundary';
|
||||
import { Button } from '@umami/react-zen';
|
||||
import { Button, Column } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import styles from './ErrorBoundary.module.css';
|
||||
|
||||
const logError = (error: Error, info: ErrorInfo) => {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
@ -14,12 +13,20 @@ export function ErrorBoundary({ children }: { children: ReactNode }) {
|
|||
|
||||
const fallbackRender = ({ error, resetErrorBoundary }) => {
|
||||
return (
|
||||
<div className={styles.error} role="alert">
|
||||
<Column
|
||||
role="alert"
|
||||
gap
|
||||
width="100%"
|
||||
height="100%"
|
||||
position="absolute"
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
>
|
||||
<h1>{formatMessage(messages.error)}</h1>
|
||||
<h3>{error.message}</h3>
|
||||
<pre>{error.stack}</pre>
|
||||
<Button onClick={resetErrorBoundary}>OK</Button>
|
||||
</div>
|
||||
</Column>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export function SideMenu({
|
|||
<Heading size="1">{title}</Heading>
|
||||
</Row>
|
||||
)}
|
||||
<NavMenu muteItems={false} gap="6" {...props}>
|
||||
<NavMenu gap="6" {...props}>
|
||||
{items?.map(({ label, items }, index) => {
|
||||
return (
|
||||
<NavMenuGroup
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export function TypeConfirmationForm({
|
|||
<Form onSubmit={onConfirm} error={error}>
|
||||
<p>
|
||||
{formatMessage(messages.actionConfirmation, {
|
||||
confirmation: <b key={messages.actionConfirmation.id}>{confirmationValue}</b>,
|
||||
confirmation: confirmationValue,
|
||||
})}
|
||||
</p>
|
||||
<FormField
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue