Skip to content

Commit

Permalink
Merge 714bb25 into f6fcf0c
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Sep 13, 2023
2 parents f6fcf0c + 714bb25 commit 337dbd5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/blue-deers-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@navikt/ds-react": patch
"@navikt/ds-css": patch
---

Skeleton: Width fungerer nå med inline-variant av Skeleton
4 changes: 4 additions & 0 deletions @navikt/core/css/skeleton.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
pointer-events: none;
}

.navds-skeleton--inline {
display: inline-block;
}

.navds-skeleton--has-children {
color: transparent;
}
Expand Down
1 change: 1 addition & 0 deletions @navikt/core/react/src/skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(
"navds-skeleton--has-children": Boolean(children),
"navds-skeleton--no-height": !height,
"navds-skeleton--no-width": !width,
"navds-skeleton--inline": As === "span",
}
)}
style={{ ...style, width, height }}
Expand Down
7 changes: 4 additions & 3 deletions @navikt/core/react/src/skeleton/skeleton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ export const InlineText = {
render: () => (
<BodyLong>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur
voluptas sint dolore <Skeleton as="span">omnis quia consequatur</Skeleton>{" "}
beatae vero cum officia debitis. Quidem debitis omnis reprehenderit nobis
rerum. Nulla, magnam? Saepe, eveniet?
voluptas sint dolore <Skeleton width="40px" as="span" variant="text" />{" "}
beatae vero cum officia debitis. Quidem debitis omnis reprehenderit nobis{" "}
<Skeleton as="span">test text</Skeleton> rerum. Nulla, magnam? Saepe,
eveniet?
</BodyLong>
),
};

0 comments on commit 337dbd5

Please sign in to comment.