mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-26 06:21:18 -08:00
feat: show error message in larger space
This commit is contained in:
parent
8586e30411
commit
76b0cc2f6b
4 changed files with 16 additions and 25 deletions
|
|
@ -1,20 +1,14 @@
|
|||
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Typography, Button, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import { Typography, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
|
||||
import type { IWikiWorkspaceFormProps } from './useForm';
|
||||
import { useValidateCloneWiki, useCloneWiki } from './useCloneWiki';
|
||||
import { useWikiCreationProgress } from './useIndicator';
|
||||
import { WikiLocation } from './FormComponents';
|
||||
|
||||
const CloseButton = styled(Button)`
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
`;
|
||||
import { WikiLocation, CloseButton } from './FormComponents';
|
||||
|
||||
export function CloneWikiDoneButton({ form, isCreateMainWorkspace }: IWikiWorkspaceFormProps & { isCreateMainWorkspace: boolean }): JSX.Element {
|
||||
const { t } = useTranslation();
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Typography, Button, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import { Typography, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
|
||||
import type { IWikiWorkspaceFormProps } from './useForm';
|
||||
import { useValidateExistedWiki, useExistedWiki } from './useExistedWiki';
|
||||
import { useWikiCreationProgress } from './useIndicator';
|
||||
import { WikiLocation } from './FormComponents';
|
||||
|
||||
const CloseButton = styled(Button)`
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
`;
|
||||
import { WikiLocation, CloseButton } from './FormComponents';
|
||||
|
||||
export function ExistedWikiDoneButton({
|
||||
form,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import styled from 'styled-components';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { Paper, Button, TextField, Autocomplete, Typography } from '@material-ui/core';
|
||||
|
||||
export const CreateContainer = styled(Paper)`
|
||||
|
|
@ -18,6 +18,15 @@ export const LocationPickerButton = styled(Button)`
|
|||
white-space: nowrap;
|
||||
width: fit-content;
|
||||
`;
|
||||
export const CloseButton = styled(Button)`
|
||||
${({ disabled }) =>
|
||||
disabled === true
|
||||
? ''
|
||||
: css`
|
||||
white-space: nowrap;
|
||||
`}
|
||||
width: 100%;
|
||||
`;
|
||||
LocationPickerButton.defaultProps = {
|
||||
variant: 'contained',
|
||||
color: 'inherit',
|
||||
|
|
|
|||
|
|
@ -1,20 +1,14 @@
|
|||
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Typography, Button, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import { Typography, LinearProgress, Snackbar } from '@material-ui/core';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
|
||||
import type { IWikiWorkspaceFormProps } from './useForm';
|
||||
import { useValidateNewWiki, useNewWiki } from './useNewWiki';
|
||||
import { useWikiCreationProgress } from './useIndicator';
|
||||
import { WikiLocation } from './FormComponents';
|
||||
|
||||
const CloseButton = styled(Button)`
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
`;
|
||||
import { WikiLocation, CloseButton } from './FormComponents';
|
||||
|
||||
export function NewWikiDoneButton({
|
||||
form,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue