-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
119 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@navikt/ds-react": patch | ||
"@navikt/ds-css": patch | ||
--- | ||
|
||
Stack: Kan nå endre direction, justify og align ved brekkpunkt. `Stack` er også nå en egen komponent sammen med `HStack` og `VStack`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { HStack, type HStackProps } from "./HStack"; | ||
export { VStack, type VStackProps } from "./VStack"; | ||
export { Stack, type StackProps } from "./Stack"; | ||
export { Spacer } from "./Spacer"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
aksel.nav.no/website/pages/eksempler/h-stack/responsive-direction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Stack } from "@navikt/ds-react"; | ||
import { withDsExample } from "components/website-modules/examples/withDsExample"; | ||
|
||
const Example = () => { | ||
return ( | ||
<Stack | ||
gap="4" | ||
direction={{ xs: "column", md: "row" }} | ||
align={{ xs: "center", md: "start" }} | ||
> | ||
<Placeholder /> | ||
<Placeholder /> | ||
<Placeholder /> | ||
<Placeholder /> | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default withDsExample(Example, { | ||
showBreakpoints: true, | ||
variant: "full", | ||
}); | ||
|
||
/* Storybook story */ | ||
export const Demo = { | ||
render: Example, | ||
}; | ||
|
||
export const args = { | ||
index: 7, | ||
desc: "Ønsker du å endre fra 'row' til 'column' ved et brekkpunkt kan du bruke 'Stack'-komponenten. Husk å også oppdatere 'align' og 'justify' samtidig.", | ||
}; | ||
|
||
const Placeholder = () => { | ||
return <div className="aspect-square h-12 rounded bg-teal-500 even:h-8" />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters