Skip to content

Commit

Permalink
Refactor examples of Vstack and HStack (#3244)
Browse files Browse the repository at this point in the history
  • Loading branch information
HalvorHaugan authored Oct 16, 2024
1 parent a273a22 commit c941af9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Box } from "@navikt/ds-react";

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
flexShrink="0"
/>
);

export { Placeholder };
12 changes: 2 additions & 10 deletions aksel.nav.no/website/pages/eksempler/h-stack/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Box, HStack } from "@navikt/ds-react";
import { HStack } from "@navikt/ds-react";
import { withDsExample } from "@/web/examples/withDsExample";
import { Placeholder } from "../../../components/website-modules/examples/__parts/StackPlaceholder";

const Example = () => {
return (
Expand All @@ -12,15 +13,6 @@ const Example = () => {
);
};

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
/>
);

// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
export default withDsExample(Example, { showBreakpoints: true });

Expand Down
12 changes: 2 additions & 10 deletions aksel.nav.no/website/pages/eksempler/h-stack/responsive-gap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Box, HStack } from "@navikt/ds-react";
import { HStack } from "@navikt/ds-react";
import { withDsExample } from "@/web/examples/withDsExample";
import { Placeholder } from "../../../components/website-modules/examples/__parts/StackPlaceholder";

const Example = () => {
return (
Expand All @@ -12,15 +13,6 @@ const Example = () => {
);
};

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
/>
);

// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
export default withDsExample(Example, { showBreakpoints: true });

Expand Down
11 changes: 1 addition & 10 deletions aksel.nav.no/website/pages/eksempler/h-stack/wrap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Box, HStack, Heading, VStack } from "@navikt/ds-react";
import { withDsExample } from "@/web/examples/withDsExample";
import { Placeholder } from "../../../components/website-modules/examples/__parts/StackPlaceholder";

const Example = () => {
return (
Expand Down Expand Up @@ -35,16 +36,6 @@ const Example = () => {
);
};

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
flexShrink="0"
/>
);

// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
export default withDsExample(Example, { showBreakpoints: true });

Expand Down
12 changes: 2 additions & 10 deletions aksel.nav.no/website/pages/eksempler/v-stack/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Box, VStack } from "@navikt/ds-react";
import { VStack } from "@navikt/ds-react";
import { withDsExample } from "@/web/examples/withDsExample";
import { Placeholder } from "../../../components/website-modules/examples/__parts/StackPlaceholder";

const Example = () => {
return (
Expand All @@ -12,15 +13,6 @@ const Example = () => {
);
};

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
/>
);

// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
export default withDsExample(Example, { showBreakpoints: true });

Expand Down
12 changes: 2 additions & 10 deletions aksel.nav.no/website/pages/eksempler/v-stack/responsive-gap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Box, VStack } from "@navikt/ds-react";
import { VStack } from "@navikt/ds-react";
import { withDsExample } from "@/web/examples/withDsExample";
import { Placeholder } from "../../../components/website-modules/examples/__parts/StackPlaceholder";

const Example = () => {
return (
Expand All @@ -12,15 +13,6 @@ const Example = () => {
);
};

const Placeholder = () => (
<Box
background="surface-alt-3"
height="3rem"
width="3rem"
borderRadius="medium"
/>
);

// EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE
export default withDsExample(Example, { showBreakpoints: true });

Expand Down

0 comments on commit c941af9

Please sign in to comment.