Merge branch 'rm-csstype' into 'main'

Remove usage of csstype package

See merge request soapbox-pub/soapbox!3215
This commit is contained in:
Alex Gleason 2024-11-08 23:14:18 +00:00
commit 737b3554cd
1 changed files with 10 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import clsx from 'clsx'; import clsx from 'clsx';
import React, { useState, useRef, useLayoutEffect } from 'react'; import React, { useState, useRef, useLayoutEffect, CSSProperties } from 'react';
import Blurhash from 'soapbox/components/blurhash'; import Blurhash from 'soapbox/components/blurhash';
import StillImage from 'soapbox/components/still-image'; import StillImage from 'soapbox/components/still-image';
@ -13,7 +13,6 @@ import { isPanoramic, isPortrait, isNonConformingRatio, minimumAspectRatio, maxi
import SvgIcon from './ui/icon/svg-icon'; import SvgIcon from './ui/icon/svg-icon';
import type { Property } from 'csstype';
import type { List as ImmutableList } from 'immutable'; import type { List as ImmutableList } from 'immutable';
// const Gameboy = React.lazy(() => import('./gameboy')); // const Gameboy = React.lazy(() => import('./gameboy'));
@ -22,18 +21,18 @@ const ATTACHMENT_LIMIT = 4;
const MAX_FILENAME_LENGTH = 45; const MAX_FILENAME_LENGTH = 45;
interface Dimensions { interface Dimensions {
w: Property.Width | number; w: CSSProperties['width'];
h: Property.Height | number; h: CSSProperties['height'];
t?: Property.Top; t?: CSSProperties['top'];
r?: Property.Right; r?: CSSProperties['right'];
b?: Property.Bottom; b?: CSSProperties['bottom'];
l?: Property.Left; l?: CSSProperties['left'];
float?: Property.Float; float?: CSSProperties['float'];
pos?: Property.Position; pos?: CSSProperties['position'];
} }
interface SizeData { interface SizeData {
style: React.CSSProperties; style: CSSProperties;
itemsDimensions: Dimensions[]; itemsDimensions: Dimensions[];
size: number; size: number;
width: number; width: number;