forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(sidepanel, createsidepanel): adds ai label docs (carbon-design-s…
…ystem#6468) * feat: starting ai label story for sidepanel * docs(sidepanel): adds with ai label docs * docs(createsidepanel): adds aiLabel docs --------- Co-authored-by: Matt Gallo <[email protected]>
- Loading branch information
1 parent
0072e42
commit 9f31fc3
Showing
4 changed files
with
101 additions
and
39 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
73 changes: 73 additions & 0 deletions
73
packages/ibm-products/src/components/SidePanel/SidePanel.docs-page.js
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,73 @@ | ||
/** | ||
* Copyright IBM Corp. 2024 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage'; | ||
|
||
import * as stories from './SidePanel'; | ||
|
||
const DocsPage = () => ( | ||
<StoryDocsPage | ||
blocks={[ | ||
{ | ||
story: stories.SlideOver, | ||
}, | ||
{ | ||
story: stories.SlideIn, | ||
}, | ||
{ | ||
story: stories.WithActionToolbar, | ||
}, | ||
{ | ||
story: stories.PanelWithSecondStep, | ||
}, | ||
{ | ||
story: stories.SpecifyElementToHaveInitialFocus, | ||
}, | ||
{ | ||
story: stories.WithStaticTitle, | ||
}, | ||
{ | ||
story: stories.FirstElementDisabled, | ||
}, | ||
{ | ||
story: stories.WithStaticTitleAndActionToolbar, | ||
}, | ||
{ | ||
story: stories.WithoutTitle, | ||
}, | ||
{ | ||
title: 'With AI Label', | ||
story: stories.WithAILabel, | ||
description: | ||
'An AI Label is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level. A Carbon AI Label can be provided to the Tearsheet component by including an `aiLabel` property on it and providing the carbon AILabel component as its own custom component.', | ||
source: { | ||
language: 'html', | ||
code: ` | ||
<SidePanel | ||
{...args} | ||
aiLabel={ | ||
// carbon AILabel component | ||
<AILabel | ||
className="ai-label-container" | ||
autoAlign={false} | ||
align="bottom-right" | ||
> | ||
<AILabelContent>... ...</AILabelContent> | ||
</AILabel> | ||
} | ||
> | ||
... | ||
</SidePanel> | ||
`, | ||
}, | ||
}, | ||
]} | ||
/> | ||
); | ||
|
||
export default DocsPage; |
34 changes: 0 additions & 34 deletions
34
packages/ibm-products/src/components/SidePanel/SidePanel.mdx
This file was deleted.
Oops, something went wrong.
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