mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-21 12:53:56 +01:00
feat: start on embed host
This commit is contained in:
1 parent
a5aad61cb7
commit
abd63b92a8
7 files changed
+30
-16
No files matched your search
@@ -1,18 +1,18 @@
|
||||
import { Box } from '@radix-ui/themes';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { previews } from '../../../constants/embeds';
|
||||
import { embedPreviews } from '../../../constants/embeds';
|
||||
import { useEmbedStateCurry } from '../../../stores/embedState/utilities';
|
||||
import * as styles from './index.css';
|
||||
|
||||
interface PreviewWrapperProps {
|
||||
name: keyof typeof previews;
|
||||
name: keyof typeof embedPreviews;
|
||||
}
|
||||
|
||||
export function PreviewWrapper({ name }: PreviewWrapperProps) {
|
||||
const { useState } = useEmbedStateCurry();
|
||||
const width = useState('width');
|
||||
const height = useState('height');
|
||||
const Preview = previews[name];
|
||||
const Preview = embedPreviews[name];
|
||||
const wrapper = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user