This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // types.ts: | |
| const Appearance = { | |
| DARK: 'dark', | |
| LIGHT: 'light', | |
| } as const; | |
| type Appearance = typeof Appearance[keyof typeof Appearance]; | |
| appearance_listener.ts: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any, Union | |
| from aiogram.types import InlineKeyboardButton | |
| from aiogram_dialog import DialogManager | |
| from aiogram_dialog.api.internal import RawKeyboard, ButtonVariant | |
| from aiogram_dialog.widgets.common import Scroll, WhenCondition | |
| from aiogram_dialog.widgets.common.scroll import ManagedScroll | |
| from aiogram_dialog.widgets.kbd.pager import ( | |
| DEFAULT_CURRENT_PAGE_TEXT, | |
| DEFAULT_PAGE_TEXT, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface PaginationRange { | |
| current: number; | |
| max: number; | |
| min: number; | |
| size: number; | |
| }; | |
| interface PageItem { | |
| val: number; | |
| text: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| interface UseLazyLoadProps { | |
| enabled: boolean, | |
| onTrigger: () => void, | |
| scrollContainer?: Window | HTMLElement, | |
| triggerOnReverseScroll?: boolean, | |
| }; | |
| export const useLazyLoad = ({ |