@delab-team/de-ui
TypeScript icon, indicating that this package has built-in type declarations

0.0.29 • Public • Published

DE-UI logo

license mit typescript

A versatile and customizable React UI library designed to streamline the development of beautiful and responsive user interfaces. Packed with a rich set of components and themes, it empowers developers to create stunning web applications with ease.

Install

  • as local project package
yarn add @delab-team/de-ui

Documentation

It is necessary to wrap your entire application within the AppInner component. Failure to do so may result in the application not working as expected. You also have the option to manually set the value to true in order to witness the application's outcome adorned with Telegram styles.

index.html

<script src="https://telegram.org/js/telegram-web-app.js"></script>

App.tsx

import { AppInner } from '@delab-team/de-ui' 
import { useEffect, useState } from 'react'

declare global {
    interface Window {
        Telegram?: any
    }
}

export const App: React.FC = () => {
    const [ firstRender, setFirstRender ] = useState<boolean>(false)
    const [ isTg, setIsTg ] = useState<boolean>(false)

    useEffect(() => {
      if (!firstRender) {
        setFirstRender(true)

        const isTgCheck = window.Telegram.WebApp.initData !== ''
        const TgObj = window.Telegram.WebApp

        setIsTg(isTgCheck)
        if (isTgCheck) {
            TgObj.ready()
            TgObj.enableClosingConfirmation()
            TgObj.expand()
        }
      }

    }, [ firstRender ])

    return (
      <AppInner isTg={isTg}>
            {/* Your application's goes here */}
      </AppInner>,
    )

}

Here's a list of components included in our library:

Modals:

Common:

Forms:

Headers

Icons:

Menu:

Wrappers:

Tables:

Typography:

License

MIT License Copyright (c) 2023 DeLab Team

Package Sidebar

Install

npm i @delab-team/de-ui

Weekly Downloads

21

Version

0.0.29

License

MIT

Unpacked Size

1.69 MB

Total Files

344

Last publish

Collaborators

  • deivana