Skip to content

Commit

Permalink
🚚 Markert gammelt grid som deprecated (#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Aug 11, 2023
1 parent 4375c55 commit d78f33d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-cars-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-react": patch
---

Grid: Markert som deprecated. Bruk nye 'HGrid'
4 changes: 4 additions & 0 deletions @navikt/core/css/config/_mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ const StyleMappings = {
main: "help-text.css",
dependencies: ["popover.css"],
},
{
component: "HGrid",
main: "hgrid.css",
},
{ component: "Ingress", main: typoCss },
{
component: "InternalHeader",
Expand Down
4 changes: 4 additions & 0 deletions @navikt/core/react/src/grid/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export interface CellProps extends HTMLAttributes<HTMLDivElement> {
lg?: Column;
}

/**
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
*/
export const Cell = forwardRef<HTMLDivElement, CellProps>(
({ children, xs, sm, md, lg, className, ...rest }, ref) => {
return (
Expand Down
4 changes: 4 additions & 0 deletions @navikt/core/react/src/grid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
children: React.ReactNode;
}

/**
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
*/
export const Grid = forwardRef<HTMLDivElement, GridProps>(
({ children, className, ...rest }, ref) => (
<div ref={ref} className={cl("navds-grid", className)} {...rest}>
Expand Down
4 changes: 0 additions & 4 deletions @navikt/core/react/src/grid/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
export { default as Cell, type CellProps } from "./Cell";
export { default as Grid, type GridProps } from "./Grid";
export {
default as ContentContainer,
type ContentContainerProps,
} from "./ContentContainer";
1 change: 1 addition & 0 deletions @navikt/core/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ export * from "./typography";
export * from "./util";
export * from "./layout/stack";
export * from "./layout/grid";
export * from "./layout/content-container";
4 changes: 4 additions & 0 deletions @navikt/core/react/src/layout/content-container/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export {
default as ContentContainer,
type ContentContainerProps,
} from "./ContentContainer";

0 comments on commit d78f33d

Please sign in to comment.