Skip to content

Commit

Permalink
Apply required changes to VKUI examples
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-medvedev-vk committed Oct 30, 2024
1 parent dd9e60b commit 91f7915
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions styleguide/Components/Frame/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DOMContext } from '@vkui/lib/dom';
import { useLoadThemeTokens } from '../../lib/theme/useLoadThemeTokens';
import './Frame.css';

const FrameDomProvider = ({ platform, colorSchemeOptions, themeName, children }) => {
const FrameDomProvider = ({ colorSchemeOptions, themeName, children }) => {
const [ready, setReady] = React.useState(false);
const frame = useFrame();

Expand All @@ -29,7 +29,9 @@ const FrameDomProvider = ({ platform, colorSchemeOptions, themeName, children })
hotIconChange.observe(sprite, { characterData: true, childList: true });
hotObservers.push(hotIconChange);

frame.document.querySelector('.frame-content').setAttribute('id', 'root');
const frameContent = frame.document.querySelector('.frame-content');
frameContent.setAttribute('id', 'root');
frameContent.classList.add('vkui__root');

// Пихаем в iFrame vkui стили
const frameAssets = document.createDocumentFragment();
Expand Down Expand Up @@ -62,7 +64,7 @@ const FrameDomProvider = ({ platform, colorSchemeOptions, themeName, children })

const initialFrameContent = `
<!DOCTYPE html>
<html>
<html class="vkui">
<head>
<style>
#root {
Expand Down

0 comments on commit 91f7915

Please sign in to comment.