Skip to content

Commit

Permalink
Merge pull request #1151 from amtoussam/feature/create-overview-story
Browse files Browse the repository at this point in the history
chore: deprecate  entire repo
  • Loading branch information
lily-peng authored May 17, 2022
2 parents dc75db7 + 3c3bc98 commit 8c57c28
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 16 deletions.
20 changes: 18 additions & 2 deletions .storybook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@ import { LIBRARY } from '../src/components/LayoutModules/stories';

// Category labels.
const CATEGORIES = {
OVERVIEW: 'Overview',
COMPONENTS: 'Components',
DEPRECATED: 'Deprecated',
LAYOUT_MODULES: 'Layout modules',
PAGE_LAYOUTS: 'Layouts',
PATTERNS: 'Patterns',
};

const { COMPONENTS, DEPRECATED, LAYOUT_MODULES, PAGE_LAYOUTS, PATTERNS } =
CATEGORIES;
const {
OVERVIEW,
COMPONENTS,
DEPRECATED,
LAYOUT_MODULES,
PAGE_LAYOUTS,
PATTERNS,
} = CATEGORIES;

const ORDER = [
OVERVIEW,
LAYOUT_MODULES,
[LIBRARY],
PAGE_LAYOUTS,
Expand Down Expand Up @@ -61,6 +69,13 @@ const getDeprecatedCategory = bindCategory(DEPRECATED);
*/
const getLayoutModulesCategory = bindCategory(LAYOUT_MODULES);

/**
* Returns a formatted string for the layout modules category.
* @param {string} storyName The story name to format.
* @returns {string} The formatted layout module category and story name.
*/
const getOverviewModulesCategory = bindCategory(OVERVIEW);

/**
* Returns a formatted string for the page layouts category.
* @param {string} storyName The story name to format.
Expand Down Expand Up @@ -141,6 +156,7 @@ export {
getDeprecatedCategory as deprecated,
getDocsId,
getDocsParameters,
getOverviewModulesCategory as overviewModules,
getLayoutModulesCategory as layoutModules,
getPageLayoutsCategory as pageLayouts,
getPatternsCategory as patterns,
Expand Down
21 changes: 7 additions & 14 deletions src/components/LayoutModules/stories/Library.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-actionbarmodule')}
story="default"
>
story="default">
<img alt="Link to action bar module" src={actionBarModule} />
</LinkTo>
</Column>
Expand All @@ -45,8 +44,7 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-buttonclustermodule')}
story="default"
>
story="default">
<img alt="Link to button cluster module" src={buttonClusterModule} />
</LinkTo>
</Column>
Expand All @@ -55,8 +53,7 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-cardareamodule')}
story="default"
>
story="default">
<img alt="Link to card area module" src={cardAreaModule} />
</LinkTo>
</Column>
Expand All @@ -78,8 +75,7 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-descriptionlistmodule')}
story="default"
>
story="default">
<img alt="Link to description list module" src={descriptionListModule} />
</LinkTo>
</Column>
Expand All @@ -88,8 +84,7 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-icamodule')}
story="default"
>
story="default">
<img alt="Link to ICA module" src={icaModule} />
</LinkTo>
</Column>
Expand All @@ -101,17 +96,15 @@ our other pages.
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-titlebarmodule')}
story="default"
>
story="default">
<img alt="Link to title bar module" src={titleBarModule} />
</LinkTo>
</Column>
<Column lg={4}>
<LinkTo
className="storybook__link--image"
kind={getDocsId('layout-modules-listitemmodule')}
story="default"
>
story="default">
<img alt="Link to list item module" src={listItemModule} />
</LinkTo>
</Column>
Expand Down
19 changes: 19 additions & 0 deletions src/components/Overview/stories/Overview.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Meta } from '@storybook/addon-docs';

import { getDocsId } from '../../../../.storybook';

import getTitle, { OVERVIEW, parameters } from '.';

<Meta parameters={parameters} title={getTitle(OVERVIEW)} />

# Carbon for IBM Security is longer supported

Carbon for IBM Security has fully migrated over
to<LinkTo target="https://carbon-for-ibm-products.netlify.app/?path=/story/overview-getting-started--page">
Carbon for IBM Products</LinkTo>. Upgrade to 2.7+ to ensure you are receiving
the latest package of components, patterns and layouts.

<a href="https://github.com/carbon-design-system/ibm-cloud-cognitive/tree/main/packages/security">
{' '}
Visit here for more details.
</a>
12 changes: 12 additions & 0 deletions src/components/Overview/stories/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @file Story information.
* @copyright IBM Security 2020 - 2021
*/

import { parameters, overviewModules } from '../../../../.storybook';

const OVERVIEW = 'Overview';

export default (title) => overviewModules(title);

export { OVERVIEW, parameters };

0 comments on commit 8c57c28

Please sign in to comment.