fix: images in /today expanding parent

This commit is contained in:
TresAbhi committed 2023-06-06 00:25:23 +00:00
1 parent 632881c6b0
commit 26e78c72b9
7 files changed
+13 -30

No files matched your search

@@ -34,6 +34,7 @@ export function Row({
return (
<div style={{ display: 'flex', gap: 16 }}>
<RowDiscriminator name={name} icon={icon} />
<RowStat
name="Winrate"
value={`${(winrate * 100).toFixed(2)}%`}
@@ -22,9 +22,11 @@ export function RowDiscriminator({ name, icon }: RowDiscriminatorProps) {
{icon && (
<img
src={icon}
style={{ width: '100%', flex: 1, objectFit: 'cover' }}
height={0}
style={{ flex: 1, width: '100%', objectFit: 'contain' }}
/>
)}
<span
style={{
color: theme.colors.textLowContrast,
+2 -16
View File
@@ -1,25 +1,11 @@
import { ReactNode } from 'react';
import { theme } from '../stitches.config.js';
export enum WrapperSize {
Regular,
Roomy,
}
export interface WrapperProps {
children: ReactNode;
size?: WrapperSize;
}
export const WRAPPER_SIZE_WIDTHS: Record<WrapperSize, number> = {
[WrapperSize.Regular]: 640,
[WrapperSize.Roomy]: 800,
};
export default function Wrapper({
children,
size = WrapperSize.Regular,
}: WrapperProps) {
export default function Wrapper({ children }: WrapperProps) {
return (
<div
style={{
@@ -27,7 +13,7 @@ export default function Wrapper({
flexDirection: 'column',
padding: 16,
gap: 32,
width: WRAPPER_SIZE_WIDTHS[size],
width: 640,
background: 'url(https://i.imgur.com/PhS06NJ.png)',
color: theme.colors.textHighContrast,
}}