From 2acde7b2db631687b394ec9425c81f248c51ea7f Mon Sep 17 00:00:00 2001 From: Aleksandr Kuznetsov Date: Sat, 24 Jun 2023 14:52:24 +0500 Subject: [PATCH] fix: #8 --- package.json | 2 +- src/components/Epic.tsx | 7 ++++++- src/components/View.tsx | 12 +++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cc4a7dc..ebb42b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kokateam/router-vkminiapps", - "version": "0.0.3", + "version": "0.0.4", "description": "Routing library for VK Mini Apps", "main": "lib/index.js", "repository": "https://github.com/kokateam/router-vkminiapps", diff --git a/src/components/Epic.tsx b/src/components/Epic.tsx index e5c28e6..56c4329 100644 --- a/src/components/Epic.tsx +++ b/src/components/Epic.tsx @@ -1,10 +1,15 @@ import React, { FC, useEffect } from "react"; import { useRecoilState } from "recoil"; -import { Epic as VKEpic, EpicProps } from "@vkontakte/vkui"; +import { Epic as VKEpic } from "@vkontakte/vkui"; import bridge from "@vkontakte/vk-bridge"; import { structure, history } from "../storage/atoms"; +interface EpicProps extends React.HTMLAttributes { + tabbar?: React.ReactNode; + children: React.ReactNode; +} + const Epic: FC = (props) => { const [, setStructure] = useRecoilState(structure); const [historyState, setHistory] = useRecoilState(history); diff --git a/src/components/View.tsx b/src/components/View.tsx index af04cd6..a0e8b11 100644 --- a/src/components/View.tsx +++ b/src/components/View.tsx @@ -1,8 +1,18 @@ import React, { FC } from "react"; -import { View as VKView, ViewProps } from "@vkontakte/vkui"; +import { View as VKView } from "@vkontakte/vkui"; import { useRouterPanel } from "../hooks/hooks"; +export interface ViewProps { + id: string; + popout?: React.ReactNode; + modal?: React.ReactNode; + onTransition?(params: { isBack: boolean; from: string; to: string }): void; + onSwipeBackStart?(): void; + onSwipeBackCancel?(): void; + children: React.ReactNode; +} + const View: FC = (props) => { const { panel, toPanel } = useRouterPanel();