mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02: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
@@ -17,12 +17,12 @@ import {
|
||||
import { debounce } from 'lodash-es';
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
import { stringify } from 'urlon';
|
||||
import type { configurations } from '../../constants/embeds';
|
||||
import type { embedConfigurations } from '../../constants/embeds';
|
||||
import { EmbedState, type EmbedStateStore } from '../../stores/embedState';
|
||||
import { CopyButton } from '../CopyButton';
|
||||
|
||||
interface CopyURLProps {
|
||||
embed: keyof typeof configurations;
|
||||
embed: keyof typeof embedConfigurations;
|
||||
}
|
||||
|
||||
export function CopyURL({ embed }: CopyURLProps) {
|
||||
|
||||
@@ -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