Skip to content

Easy way to import Icons (like Icon28Chat etc) #111

Description

@by-belledev

I fail to understand how to use Icons as seen, for example, in Section:

<Cell before={<IconContainer><Icon28Chat /></IconContainer>}>
      Chat Settings
</Cell>
<Cell before={<IconContainer><Icon28Devices /></IconContainer>}>
      Data and Storage
</Cell>

I'm talking of Icon28Chat, Icon28Devices and so on, how do I import them easily?

They do not seem to be present at /components and thus not defined when just importing from @telegram-apps/telegram-ui.

The only way I found so far is:

import {
  Icon28Chat
} from "@telegram-apps/telegram-ui/dist/icons/28/chat";

But this will quickly get ugly if I were to import multiple icons. Is there a better way?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions