Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/lib/providers/prime-preset/tokens/components/skeleton.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/**
* Кастомная CSS-стилизация для компонента p-skeleton.
* Публикует extend-токены как CSS-переменные и применяет минимальную ширину.
* Подключается в map-tokens.ts: `import { skeletonCss } from './tokens/components/skeleton'`
*/
export const skeletonCss = ({ dt }: { dt: (token: string) => string }): string => `
/* ─── Skeleton extend: публикуем кастомные переменные в :root ─── */
:root {
--p-skeleton-extend-min-width: ${dt('skeleton.extend.minWidth')};
--p-skeleton-extend-height: ${dt('skeleton.extend.height')};
}

/* ─── Минимальная ширина ─── */
.p-skeleton {
min-width: var(--p-skeleton-extend-min-width);
}
.p-skeleton {
min-width: ${dt('skeleton.extend.minWidth')};
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/angular';
import { ExtraSkeletonComponent } from '../../../../lib/components/skeleton/skeleton.component';

const template = `
<div class="bg-surface-ground">
<div>
<div class="flex gap-4">
<extra-skeleton shape="circle" size="4rem"></extra-skeleton>
<div class="flex flex-col gap-2 flex-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/angular';
import { ExtraSkeletonComponent } from '../../../../lib/components/skeleton/skeleton.component';

const template = `
<div class="bg-surface-ground">
<div>
<div class="flex items-center gap-4">
<extra-skeleton shape="circle" size="3rem"></extra-skeleton>
<extra-skeleton shape="circle" size="4rem"></extra-skeleton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/angular';
import { ExtraSkeletonComponent } from '../../../../lib/components/skeleton/skeleton.component';

const template = `
<div class="bg-surface-ground">
<div>
<div class="flex flex-col gap-3">
<extra-skeleton animation="none" height="1rem"></extra-skeleton>
<extra-skeleton animation="none" height="1rem" width="75%"></extra-skeleton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/angular';
import { ExtraSkeletonComponent } from '../../../../lib/components/skeleton/skeleton.component';

const template = `
<div class="bg-surface-ground">
<div>
<div class="flex flex-col gap-3">
<extra-skeleton height="1rem"></extra-skeleton>
<extra-skeleton height="1rem" width="75%"></extra-skeleton>
Expand Down
Loading