Fix types build
This commit is contained in:
@ -1,67 +1,11 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
import { styled } from '@mui/material/styles';
|
||||
import copyToClipboard from 'copy-text-to-clipboard';
|
||||
import Button from '@mui/material/Button';
|
||||
import copyToClipboard from 'copy-text-to-clipboard';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { buttons, shadows, zIndex } from '../../components/UI/styles';
|
||||
import { isAbsolutePath } from '../../lib/util';
|
||||
import { FileUploadButton } from '../UI';
|
||||
|
||||
import type { TranslatedProps } from '../../interface';
|
||||
|
||||
const styles = {
|
||||
button: css`
|
||||
${buttons.button};
|
||||
${buttons.default};
|
||||
display: inline-block;
|
||||
margin-left: 15px;
|
||||
margin-right: 2px;
|
||||
|
||||
&[disabled] {
|
||||
${buttons.disabled};
|
||||
cursor: default;
|
||||
}
|
||||
`,
|
||||
};
|
||||
|
||||
export const UploadButton = styled(FileUploadButton)`
|
||||
${styles.button};
|
||||
${buttons.gray};
|
||||
${shadows.dropMain};
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 0.1px;
|
||||
width: 0.1px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: ${zIndex.zIndex0};
|
||||
outline: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const DeleteButton = styled('button')`
|
||||
${styles.button};
|
||||
${buttons.lightRed};
|
||||
`;
|
||||
|
||||
export const InsertButton = styled('button')`
|
||||
${styles.button};
|
||||
${buttons.green};
|
||||
`;
|
||||
|
||||
export interface CopyToClipBoardButtonProps {
|
||||
disabled: boolean;
|
||||
draft?: boolean;
|
||||
|
@ -3,8 +3,10 @@ import Button from '@mui/material/Button';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import React from 'react';
|
||||
|
||||
import { CopyToClipBoardButton, UploadButton } from './MediaLibraryButtons';
|
||||
import { CopyToClipBoardButton } from './MediaLibraryButtons';
|
||||
import MediaLibrarySearch from './MediaLibrarySearch';
|
||||
import { buttons, shadows, zIndex } from '../../components/UI/styles';
|
||||
import FileUploadButton from '../UI/FileUploadButton';
|
||||
|
||||
import type { ChangeEvent, ChangeEventHandler, KeyboardEventHandler } from 'react';
|
||||
import type { MediaFile, TranslatedProps } from '../../interface';
|
||||
@ -27,6 +29,43 @@ const StyledDialogTitle = styled(DialogTitle)`
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
const UploadButton = styled(FileUploadButton)`
|
||||
${buttons.button};
|
||||
${buttons.default};
|
||||
display: inline-block;
|
||||
margin-left: 15px;
|
||||
margin-right: 2px;
|
||||
|
||||
&[disabled] {
|
||||
${buttons.disabled};
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
${buttons.gray};
|
||||
${shadows.dropMain};
|
||||
margin-bottom: 0;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 0.1px;
|
||||
width: 0.1px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: ${zIndex.zIndex0};
|
||||
outline: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export interface MediaLibraryTopProps {
|
||||
onClose: () => void;
|
||||
forImage?: boolean;
|
||||
|
@ -94,4 +94,4 @@ const Icon = ({ type, direction, width, height, size = 'medium', className }: Ic
|
||||
);
|
||||
};
|
||||
|
||||
export default styled(Icon)``;
|
||||
export default Icon;
|
||||
|
@ -1,7 +1,18 @@
|
||||
import React from 'react';
|
||||
import { styled } from '@mui/material/styles';
|
||||
|
||||
const WidgetPreviewContainer = styled('div')`
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
const StyledWidgetPreviewContainer = styled('div')`
|
||||
margin: 15px 2px;
|
||||
`;
|
||||
|
||||
interface WidgetPreviewContainerProps {
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
const WidgetPreviewContainer = ({ children }: WidgetPreviewContainerProps) => {
|
||||
return <StyledWidgetPreviewContainer>{children}</StyledWidgetPreviewContainer>;
|
||||
};
|
||||
|
||||
export default WidgetPreviewContainer;
|
||||
|
@ -1,3 +1,2 @@
|
||||
export { default as ErrorBoundary } from './ErrorBoundary';
|
||||
export { default as FileUploadButton } from './FileUploadButton';
|
||||
export { default as SettingsDropdown } from './SettingsDropdown';
|
||||
|
Reference in New Issue
Block a user