Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавить skeleton в проект #305

Closed
aimenin opened this issue Apr 16, 2024 · 0 comments · Fixed by #329
Closed

Добавить skeleton в проект #305

aimenin opened this issue Apr 16, 2024 · 0 comments · Fixed by #329
Assignees
Labels
enhancement New feature or request верстка

Comments

@aimenin
Copy link
Collaborator

aimenin commented Apr 16, 2024

  1. Выбрать библиотеку
  2. Добавить ее в проект
  3. Добавить скелетон на карточки в категории

Как можно легко внедрить скелетон к себе в компонент.

NavItem.Skeleton = function SkeletonNavItem() {
  return (
    <div className="flex items-center gap-x-2">
      <div className="w-10 h-10 relative shrink-0">
        <Skeleton className="h-full w-full absolute" />
      </div>
      <Skeleton className="h-10 w-full" />
    </div>
  );
};

Таким образом мы далее можем использовать скелетон компонента NavItem таким образом:

<NavItem.Skeleton />
@aimenin aimenin added enhancement New feature or request верстка labels Apr 16, 2024
@aimenin aimenin added this to the Каталог milestone Apr 16, 2024
MargaritaShumilina pushed a commit that referenced this issue Apr 20, 2024
@MargaritaShumilina MargaritaShumilina linked a pull request Apr 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request верстка
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants