2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 04:12:11 +00:00

update to new style

This commit is contained in:
Matthias Mair
2024-04-15 17:16:36 +02:00
parent 364052b8bc
commit 52a463634c
3 changed files with 14 additions and 11 deletions

View File

@@ -69,7 +69,12 @@ export function ApiImage(props: ApiImageProps) {
return (
<Stack>
{image && image.length > 0 ? (
<Image {...props} src={image} withPlaceholder fit="contain" />
<Image
{...props}
src={image}
//fallbackSrc="https://placehold.co/600x400?text=Placeholder"
fit="contain"
/>
) : (
<Skeleton h={props?.h ?? props.w} w={props?.w ?? props.h} />
)}

View File

@@ -28,16 +28,12 @@ export function Thumbnail({
<Group align={align ?? 'left'} gap="xs" wrap="nowrap">
<ApiImage
src={src || backup_image}
alt={alt}
width={size}
aria-label={alt}
w={size}
fit="contain"
radius="xs"
withPlaceholder
imageProps={{
style: {
maxHeight: size
}
}}
//fallbackSrc="https://placehold.co/600x400?text=Placeholder"
style={{ maxHeight: size }}
/>
{text}
</Group>

View File

@@ -86,7 +86,8 @@ export function PartCategoryTree({
return {
dark: {
text: {
...vars.fontStyles()
fontFamily: vars.fontFamily,
fontSize: vars.fontSizes.md
},
nodes: {
height: '2.5rem',
@@ -106,7 +107,8 @@ export function PartCategoryTree({
},
light: {
text: {
...theme.fn.fontStyles()
fontFamily: vars.fontFamily,
fontSize: vars.fontSizes.md
},
nodes: {
height: '2.5rem',