mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-16 18:40:00 +08:00
Storage icons fix
This commit is contained in:
@@ -101,6 +101,7 @@ export const useStyles = makeStyles((theme: Theme) => ({
|
||||
},
|
||||
thumbnailCloseIcon: {
|
||||
position: "absolute",
|
||||
borderRadius: "9999px",
|
||||
top: -8,
|
||||
right: -8,
|
||||
zIndex: 100,
|
||||
@@ -720,8 +721,10 @@ export function StorageItemPreview({
|
||||
variant={"outlined"}>
|
||||
|
||||
{!disabled &&
|
||||
|
||||
<a
|
||||
className={classes.thumbnailCloseIcon}>
|
||||
<IconButton
|
||||
className={classes.thumbnailCloseIcon}
|
||||
size={"small"}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
@@ -729,6 +732,7 @@ export function StorageItemPreview({
|
||||
}}>
|
||||
<ClearIcon fontSize={"small"}/>
|
||||
</IconButton>
|
||||
</a>
|
||||
}
|
||||
|
||||
{value &&
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Entity, EntitySchema } from "./entities";
|
||||
import React from "react";
|
||||
import { CMSAppContext } from "../contexts";
|
||||
import { User } from "./user";
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { CMSAppContext } from "../contexts";
|
||||
import { EnumValues, PropertiesOrBuilder } from "./properties";
|
||||
|
||||
@@ -36,6 +35,7 @@ export interface EntitySchema<M extends { [Key: string]: any } = any> {
|
||||
* When creating a new entity, set some values as already initialized
|
||||
*/
|
||||
defaultValues?: any;
|
||||
|
||||
/**
|
||||
* Array of builders for rendering additional panels in an entity view.
|
||||
* Useful if you need to render custom views
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { EntitySchema, EntityValues } from "./entities";
|
||||
import {
|
||||
ArrayProperty,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as React from "react";
|
||||
import React from "react";
|
||||
|
||||
import { FieldProps } from "./fields";
|
||||
import { PreviewComponentProps } from "../preview";
|
||||
|
||||
@@ -32,6 +32,7 @@ const useImageStyles = makeStyles<Theme, { imageSize: number }>(theme => createS
|
||||
maxHeight: "100%"
|
||||
},
|
||||
previewIcon: {
|
||||
borderRadius: "9999px",
|
||||
position: "absolute",
|
||||
bottom: -4,
|
||||
right: -4,
|
||||
@@ -87,15 +88,17 @@ export default function ImagePreview({ size, url }: ImagePreviewProps) {
|
||||
style={imageStyle}/>
|
||||
|
||||
{onHover && (
|
||||
<IconButton
|
||||
<a
|
||||
className={imageClasses.previewIcon}
|
||||
size={"small"}
|
||||
href={url}
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
onClick={(e) => e.stopPropagation()}>
|
||||
<OpenInNewIcon htmlColor={"#666"} fontSize={"small"}/>
|
||||
</IconButton>
|
||||
target="_blank">
|
||||
<IconButton
|
||||
size={"small"}
|
||||
onClick={(e) => e.stopPropagation()}>
|
||||
<OpenInNewIcon htmlColor={"#666"} fontSize={"small"}/>
|
||||
</IconButton>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user