Skip to content

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

@by-belledev

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions