Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Layout): mark layout components as deprecated #1700

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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