Skip to content

Commit

Permalink
feat(Layout): mark layout components as deprecated (#1700)
Browse files Browse the repository at this point in the history
- point users of the components to use tailwind CSS instead
  • Loading branch information
booc0mtaco committed Jul 19, 2023
1 parent b4fd00c commit 930a369
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/components/Layout/Layout.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -8,7 +9,7 @@ export default {
title: 'Components/Layout',
component: Layout,
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
children: (
Expand Down
8 changes: 8 additions & 0 deletions src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ export interface Props {
}

/**
* The Layout components are deprecated and will be removed in an upcoming release.
* Instead, please make use of utility libraries, like Tailwind CSS:
* * https://tailwindcss.com/docs/display
* * https://tailwindcss.com/docs/container
* * https://tailwindcss.com/docs/columns
*
* `import {Layout} from "@chanzuckerberg/eds";`
*
* Component that controls an overarching page layout. By default, the layout renders
* a fixed-position left sidebar on larger screens.
*
* @deprecated
*/
export const Layout = ({
behavior,
Expand Down
3 changes: 2 additions & 1 deletion src/components/LayoutContainer/LayoutContainer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -10,7 +11,7 @@ export default {
axe: {
skip: true,
},
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
children: <div className="fpo">Layout container</div>,
Expand Down
8 changes: 8 additions & 0 deletions src/components/LayoutContainer/LayoutContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ export interface Props {
}

/**
* The Layout components are deprecated and will be removed in an upcoming release.
* Instead, please make use of utility libraries, like Tailwind CSS:
* * https://tailwindcss.com/docs/display
* * https://tailwindcss.com/docs/container
* * https://tailwindcss.com/docs/columns
*
* `import {LayoutContainer} from "@chanzuckerberg/eds";`
*
* Layout container. Caps the width of the content to the maximum width and centers the container.
*
* @deprecated
*/
export const LayoutContainer = ({
className,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import React from 'react';

Expand All @@ -7,7 +8,7 @@ export default {
title: 'Components/Linelength Container',
component: LayoutLinelengthContainer,
parameters: {
badges: ['1.0'],
badges: ['1.0', BADGE.DEPRECATED],
},
args: {
children: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ export interface Props {
}

/**
* The Layout components are deprecated and will be removed in an upcoming release.
* Instead, please make use of utility libraries, like Tailwind CSS:
* * https://tailwindcss.com/docs/display
* * https://tailwindcss.com/docs/container
* * https://tailwindcss.com/docs/columns
*
* `import {LayoutLinelengthContainer} from "@chanzuckerberg/eds";`
*
* Component that caps the length of an excerpt of text to be easily readable.
*
* @deprecated
*/
export const LayoutLinelengthContainer = ({
className,
Expand Down
8 changes: 8 additions & 0 deletions src/components/LayoutSection/LayoutSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ export interface Props {
}

/**
* The Layout components are deprecated and will be removed in an upcoming release.
* Instead, please make use of utility libraries, like Tailwind CSS:
* * https://tailwindcss.com/docs/display
* * https://tailwindcss.com/docs/container
* * https://tailwindcss.com/docs/columns
*
* `import {LayoutSection} from "@chanzuckerberg/eds";`
*
* Layout section.
*
* @deprecated
*/
export const LayoutSection = ({
children,
Expand Down

0 comments on commit 930a369

Please sign in to comment.