feat: start of embeds

This commit is contained in:
TrèsAbhi committed 2024-08-05 12:52:40 -05:00
1 parent f666023bef
commit 6984794be1
23 files changed
+313 -30

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
import { Flex } from '@radix-ui/themes';
import { ReactNode } from 'react';
import { TanksEmbedState } from '../app/tools/embed/customize/tanks/page';
import { TankDefinition } from '../core/blitzkit/tankDefinitions';
interface TanksEmbedWrapperProps {
children: ReactNode;
state: TanksEmbedState;
}
export function TanksEmbedWrapper({ children, state }: TanksEmbedWrapperProps) {
return (
<Flex direction="column" gap={state.listGap} width={`${state.listWidth}px`}>
{children}
</Flex>
);
}
interface TanksEmbedCardProps {
tank: TankDefinition;
state: TanksEmbedState;
}
export function TanksEmbedCard({ tank, state }: TanksEmbedCardProps) {
return (
<Flex
direction="column"
style={{
borderRadius: `var(--radius-${state.cardRadius})`,
overflow: 'hidden',
backgroundColor: 'var(--color-panel-solid)',
}}
>
<Flex
justify="center"
style={{
backgroundColor: 'var(--color-panel-translucent)',
}}
p={state.cardHeaderPadding}
>
{tank.name}
</Flex>
<Flex>asd</Flex>
</Flex>
);
}