diff --git a/packages/react/src/components/Heading/Heading.stories.js b/packages/react/src/components/Heading/Heading.stories.js
index 84ecbcf99fdc..b3e240c70b7c 100644
--- a/packages/react/src/components/Heading/Heading.stories.js
+++ b/packages/react/src/components/Heading/Heading.stories.js
@@ -20,6 +20,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = () => {
diff --git a/packages/react/src/components/HideAtBreakpoint/HideAtBreakpoint.stories.js b/packages/react/src/components/HideAtBreakpoint/HideAtBreakpoint.stories.js
index 9854d5bef37e..bb8ddaec0324 100644
--- a/packages/react/src/components/HideAtBreakpoint/HideAtBreakpoint.stories.js
+++ b/packages/react/src/components/HideAtBreakpoint/HideAtBreakpoint.stories.js
@@ -17,6 +17,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const HideAtBreakpoint = () => {
diff --git a/packages/react/src/components/IconButton/IconButton.stories.js b/packages/react/src/components/IconButton/IconButton.stories.js
index a2ca7e744eda..bd6bf348b817 100644
--- a/packages/react/src/components/IconButton/IconButton.stories.js
+++ b/packages/react/src/components/IconButton/IconButton.stories.js
@@ -23,6 +23,16 @@ export default {
},
layout: 'centered',
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = (args) => {
@@ -79,6 +89,11 @@ Default.argTypes = {
},
options: ['primary', 'secondary', 'ghost', 'tertiary'],
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const withBadgeIndicator = (args) => {
@@ -104,3 +119,10 @@ withBadgeIndicator.parameters = {
exclude: ['size', 'kind'],
},
};
+withBadgeIndicator.argTypes = {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
diff --git a/packages/react/src/components/IconIndicator/IconIndicator.stories.js b/packages/react/src/components/IconIndicator/IconIndicator.stories.js
index 5a9a9d75374d..512cc0ed073a 100644
--- a/packages/react/src/components/IconIndicator/IconIndicator.stories.js
+++ b/packages/react/src/components/IconIndicator/IconIndicator.stories.js
@@ -9,17 +9,6 @@ import React from 'react';
import IconIndicator from '.';
import { IconIndicatorKinds } from './index';
import mdx from './IconIndicator.mdx';
-
-export default {
- title: 'Preview/StatusIndicators/preview__IconIndicator',
- component: IconIndicator,
- parameters: {
- docs: {
- page: mdx,
- },
- },
-};
-
const sharedArgTypes = {
label: {
control: {
@@ -35,6 +24,26 @@ const sharedArgTypes = {
},
options: [16, 20],
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+export default {
+ title: 'Preview/StatusIndicators/preview__IconIndicator',
+ component: IconIndicator,
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ },
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ ...sharedArgTypes,
+ },
};
export const Default = (props) => {
diff --git a/packages/react/src/components/Icons/Icons.stories.js b/packages/react/src/components/Icons/Icons.stories.js
index f5128bd2df4f..fa8388b5c3ce 100644
--- a/packages/react/src/components/Icons/Icons.stories.js
+++ b/packages/react/src/components/Icons/Icons.stories.js
@@ -19,6 +19,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
decorators: [
(Story, { args }) => {
return (
diff --git a/packages/react/src/components/IdPrefix/IdPrefix.stories.js b/packages/react/src/components/IdPrefix/IdPrefix.stories.js
index f41d86ebaa97..e22e10bc6117 100644
--- a/packages/react/src/components/IdPrefix/IdPrefix.stories.js
+++ b/packages/react/src/components/IdPrefix/IdPrefix.stories.js
@@ -18,6 +18,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = () => {
diff --git a/packages/react/src/components/InlineLoading/InlineLoading.stories.js b/packages/react/src/components/InlineLoading/InlineLoading.stories.js
index dcc5685a16f5..1c1cbb5cc090 100644
--- a/packages/react/src/components/InlineLoading/InlineLoading.stories.js
+++ b/packages/react/src/components/InlineLoading/InlineLoading.stories.js
@@ -10,9 +10,33 @@ import Button from '../Button';
import InlineLoading from '.';
import mdx from './InlineLoading.mdx';
+const defaultArgs = {
+ description: 'Loading',
+ iconDescription: 'Loading data...',
+ theme: 'g10',
+};
+const defaultArgTypes = {
+ description: {
+ control: {
+ type: 'text',
+ },
+ },
+ iconDescription: {
+ control: {
+ type: 'text',
+ },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/InlineLoading',
component: InlineLoading,
+ argTypes: defaultArgTypes,
+ args: defaultArgs,
parameters: {
docs: {
page: mdx,
@@ -79,26 +103,8 @@ export const UxExample = () => {
export const Default = (args) =>
;
-Default.args = {
- description: 'Loading',
- iconDescription: 'Loading data...',
-};
-
Default.parameters = {
controls: {
exclude: ['successDelay'],
},
};
-
-Default.argTypes = {
- description: {
- control: {
- type: 'text',
- },
- },
- iconDescription: {
- control: {
- type: 'text',
- },
- },
-};
diff --git a/packages/react/src/components/Layer/Layer.stories.js b/packages/react/src/components/Layer/Layer.stories.js
index af9efb2a3e72..92edfea1bc5c 100644
--- a/packages/react/src/components/Layer/Layer.stories.js
+++ b/packages/react/src/components/Layer/Layer.stories.js
@@ -23,6 +23,14 @@ export default {
},
args: {
level: 0,
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
};
@@ -81,7 +89,13 @@ export const CustomLevel = (args) => {
CustomLevel.args = {
level: 2,
};
-
+CustomLevel.argTypes = {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export const UseLayer = () => {
function ExampleComponent() {
const { level } = useLayer();
diff --git a/packages/react/src/components/Layout/Layout.stories.js b/packages/react/src/components/Layout/Layout.stories.js
index 1a93911eb15a..702b7e35de76 100644
--- a/packages/react/src/components/Layout/Layout.stories.js
+++ b/packages/react/src/components/Layout/Layout.stories.js
@@ -27,6 +27,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
const Demo = () => (
diff --git a/packages/react/src/components/Link/Link.stories.js b/packages/react/src/components/Link/Link.stories.js
index f1836bf10c12..9d6c3deae95b 100644
--- a/packages/react/src/components/Link/Link.stories.js
+++ b/packages/react/src/components/Link/Link.stories.js
@@ -22,6 +22,7 @@ export default {
disabled: false,
inline: false,
visited: false,
+ theme: 'g10',
},
argTypes: {
renderIcon: {
@@ -29,6 +30,11 @@ export default {
disable: true,
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
};
diff --git a/packages/react/src/components/Loading/Loading.stories.js b/packages/react/src/components/Loading/Loading.stories.js
index 2ca9bf2d50ef..cc3d7e58ed2b 100644
--- a/packages/react/src/components/Loading/Loading.stories.js
+++ b/packages/react/src/components/Loading/Loading.stories.js
@@ -8,33 +8,15 @@
import React from 'react';
import Loading from '.';
import mdx from './Loading.mdx';
-
-export default {
- title: 'Components/Loading',
- component: Loading,
- parameters: {
- docs: {
- page: mdx,
- },
- // The id prop is deprecated and should be remove in the next major release
- controls: {
- exclude: ['id'],
- },
- },
-};
-
-export const Default = (args) => {
- return
;
-};
-
-Default.args = {
+const Defaultargs = {
active: true,
withOverlay: false,
small: false,
description: 'Loading',
+ theme: 'g10',
};
-Default.argTypes = {
+const DefaultargTypes = {
active: {
control: {
type: 'boolean',
@@ -55,4 +37,28 @@ Default.argTypes = {
type: 'text',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+export default {
+ title: 'Components/Loading',
+ component: Loading,
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ // The id prop is deprecated and should be remove in the next major release
+ controls: {
+ exclude: ['id'],
+ },
+ },
+};
+
+export const Default = (args) => {
+ return
;
};
diff --git a/packages/react/src/components/Menu/Menu.stories.js b/packages/react/src/components/Menu/Menu.stories.js
index de27e459ab07..ee11f3fcd51e 100644
--- a/packages/react/src/components/Menu/Menu.stories.js
+++ b/packages/react/src/components/Menu/Menu.stories.js
@@ -46,7 +46,15 @@ export default {
exclude: ['target'],
},
},
+ args: {
+ theme: 'g10',
+ },
argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
mode: {
control: false,
},
diff --git a/packages/react/src/components/MenuButton/MenuButton.stories.js b/packages/react/src/components/MenuButton/MenuButton.stories.js
index ccad09e2c781..8292eae939ee 100644
--- a/packages/react/src/components/MenuButton/MenuButton.stories.js
+++ b/packages/react/src/components/MenuButton/MenuButton.stories.js
@@ -30,6 +30,16 @@ export default {
exclude: ['menuTarget'],
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = (args) => {
diff --git a/packages/react/src/components/Modal/Modal.stories.js b/packages/react/src/components/Modal/Modal.stories.js
index 6307bb6c4d15..c934005aac9e 100644
--- a/packages/react/src/components/Modal/Modal.stories.js
+++ b/packages/react/src/components/Modal/Modal.stories.js
@@ -36,6 +36,16 @@ import CheckboxGroup from '../CheckboxGroup';
export default {
title: 'Components/Modal',
component: Modal,
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
+ args: {
+ theme: 'g10',
+ },
parameters: {
docs: {
page: mdx,
diff --git a/packages/react/src/components/ModalWrapper/ ModalWrapper.stories.js b/packages/react/src/components/ModalWrapper/ ModalWrapper.stories.js
index a637e23efa4d..bbef3d102781 100644
--- a/packages/react/src/components/ModalWrapper/ ModalWrapper.stories.js
+++ b/packages/react/src/components/ModalWrapper/ ModalWrapper.stories.js
@@ -11,7 +11,15 @@ import ModalWrapper from './ModalWrapper';
export default {
title: 'Deprecated/ModalWrapper',
component: ModalWrapper,
+ args: {
+ theme: 'g10',
+ },
argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
triggerButtonKind: {
options: [
'primary',
diff --git a/packages/react/src/components/MultiSelect/MultiSelect.stories.js b/packages/react/src/components/MultiSelect/MultiSelect.stories.js
index b8626ea02bb1..39072d6754ac 100644
--- a/packages/react/src/components/MultiSelect/MultiSelect.stories.js
+++ b/packages/react/src/components/MultiSelect/MultiSelect.stories.js
@@ -117,6 +117,11 @@ export default {
readOnly: {
control: { type: 'boolean' },
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
parameters: {
docs: {
@@ -190,6 +195,7 @@ const sharedArgs = {
clearSelectionText: 'To clear selection, press Delete or Backspace,',
selectAll: false,
selectAllItemText: 'All options',
+ theme: 'g10',
};
export const Default = (args) => {
diff --git a/packages/react/src/components/Notification/stories/InlineNotification.stories.js b/packages/react/src/components/Notification/stories/InlineNotification.stories.js
index 82b4b4992617..b1e3c01b1411 100644
--- a/packages/react/src/components/Notification/stories/InlineNotification.stories.js
+++ b/packages/react/src/components/Notification/stories/InlineNotification.stories.js
@@ -30,6 +30,14 @@ export default {
statusIconDescription: 'notification',
onClose: action('onClose'),
onCloseButtonClick: action('onCloseButtonClick'),
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
};
diff --git a/packages/react/src/components/NumberInput/NumberInput.stories.js b/packages/react/src/components/NumberInput/NumberInput.stories.js
index 2daa655dce63..f6e331bcf503 100644
--- a/packages/react/src/components/NumberInput/NumberInput.stories.js
+++ b/packages/react/src/components/NumberInput/NumberInput.stories.js
@@ -47,6 +47,11 @@ const sharedArgTypes = {
},
label: { control: { type: 'text' } },
helperText: { control: { type: 'text' } },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
const reusableProps = {
@@ -85,6 +90,7 @@ Default.args = {
warnText:
'Warning message that is really long can wrap to more lines but should not be excessively long.',
size: 'md',
+ theme: 'g10',
};
Default.argTypes = { ...sharedArgTypes };
diff --git a/packages/react/src/components/OrderedList/OrderedList.stories.js b/packages/react/src/components/OrderedList/OrderedList.stories.js
index e28ddd333e8f..e4f4a539db87 100644
--- a/packages/react/src/components/OrderedList/OrderedList.stories.js
+++ b/packages/react/src/components/OrderedList/OrderedList.stories.js
@@ -21,6 +21,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = (args) => (
@@ -63,6 +73,11 @@ Default.argTypes = {
type: 'boolean',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const Nested = () => {
diff --git a/packages/react/src/components/OverflowMenu/OverflowMenu.stories.js b/packages/react/src/components/OverflowMenu/OverflowMenu.stories.js
index c1b4538acb2d..3d4c1bb4d90a 100644
--- a/packages/react/src/components/OverflowMenu/OverflowMenu.stories.js
+++ b/packages/react/src/components/OverflowMenu/OverflowMenu.stories.js
@@ -10,46 +10,13 @@ import { OverflowMenu } from './OverflowMenu';
import { default as OverflowMenuItem } from '../OverflowMenuItem';
import { Filter } from '@carbon/icons-react';
import mdx from './OverflowMenu.mdx';
-
-export default {
- title: 'Components/OverflowMenu',
- component: OverflowMenu,
- subcomponents: {
- OverflowMenuItem,
- },
- parameters: {
- docs: {
- page: mdx,
- },
- },
-};
-
-export const RenderCustomIcon = () => {
- return (
-
-
-
-
- );
-};
-export const Default = (args) => (
-
-
-
-
-
-
-
-
-);
-
-Default.args = {
+const Defaultargs = {
flipped: document?.dir === 'rtl',
focusTrap: false,
open: false,
+ theme: 'g10',
};
-
-Default.argTypes = {
+const DefaultargTypes = {
align: {
options: [
'top',
@@ -91,8 +58,45 @@ Default.argTypes = {
options: ['xs', 'sm', 'md', 'lg'],
control: { type: 'select' },
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+export default {
+ title: 'Components/OverflowMenu',
+ component: OverflowMenu,
+ subcomponents: {
+ OverflowMenuItem,
+ },
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ },
};
+export const RenderCustomIcon = () => {
+ return (
+
+
+
+
+ );
+};
+export const Default = (args) => (
+
+
+
+
+
+
+
+
+);
Default.parameters = {
controls: {
exclude: [
diff --git a/packages/react/src/components/OverflowMenuV2/OverflowMenuv2.stories.js b/packages/react/src/components/OverflowMenuV2/OverflowMenuv2.stories.js
index eba92202d679..4728e120fe2a 100644
--- a/packages/react/src/components/OverflowMenuV2/OverflowMenuv2.stories.js
+++ b/packages/react/src/components/OverflowMenuV2/OverflowMenuv2.stories.js
@@ -31,6 +31,16 @@ export default {
MenuItemRadioGroup,
MenuItemDivider,
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const _OverflowMenuV2 = () => {
diff --git a/packages/react/src/components/PageHeader/PageHeader.stories.js b/packages/react/src/components/PageHeader/PageHeader.stories.js
index 00ff5709676e..d5fa4a1f9a4c 100644
--- a/packages/react/src/components/PageHeader/PageHeader.stories.js
+++ b/packages/react/src/components/PageHeader/PageHeader.stories.js
@@ -70,12 +70,19 @@ export default {
PageHeaderHeroImage,
PageHeaderTabBar,
PageHeaderContentText,
- PageHeaderContentPageActions,
+ },
+ args: {
+ theme: 'g10',
},
argTypes: {
children: {
control: false, // ReactNode props don't work in the controls pane
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
parameters: {
docs: {
@@ -228,6 +235,11 @@ Default.argTypes = {
type: 'boolean',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const ContentWithIcon = (args) => (
diff --git a/packages/react/src/components/Pagination/Pagination.stories.js b/packages/react/src/components/Pagination/Pagination.stories.js
index 39a56da53b0b..7e798777cb9b 100644
--- a/packages/react/src/components/Pagination/Pagination.stories.js
+++ b/packages/react/src/components/Pagination/Pagination.stories.js
@@ -33,9 +33,15 @@ export default {
options: ['sm', 'md', 'lg'],
control: { type: 'select' },
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
args: {
size: 'md',
+ theme: 'g10',
},
decorators: [
(story) => (
@@ -67,6 +73,7 @@ Default.args = {
pagesUnknown: false,
pageSizeInputDisabled: false,
totalItems: 103,
+ theme: 'g10',
};
Default.argTypes = {
@@ -148,6 +155,11 @@ Default.argTypes = {
type: 'number',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const MultiplePaginationComponents = (args) => {
diff --git a/packages/react/src/components/PaginationNav/PaginationNav.stories.js b/packages/react/src/components/PaginationNav/PaginationNav.stories.js
index b9570516cfa3..e2e95789a08e 100644
--- a/packages/react/src/components/PaginationNav/PaginationNav.stories.js
+++ b/packages/react/src/components/PaginationNav/PaginationNav.stories.js
@@ -9,36 +9,17 @@ import React from 'react';
import PaginationNav from '../PaginationNav';
import './styles.scss';
import mdx from './PaginationNav.mdx';
-
-export default {
- title: 'Components/PaginationNav',
- component: PaginationNav,
- subcomponents: {},
- parameters: {
- docs: {
- page: mdx,
- },
- },
-};
-
-export const Default = (args) => {
- return (
-
- );
-};
-
-Default.args = {
+const Defaultargs = {
size: 'lg',
loop: false,
itemsShown: 10,
page: 0,
totalItems: 25,
disableOverflow: false,
+ theme: 'g10',
};
-Default.argTypes = {
+const DefaultargTypes = {
size: {
options: ['sm', 'md', 'lg'],
control: { type: 'select' },
@@ -68,4 +49,29 @@ Default.argTypes = {
type: 'boolean',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+export default {
+ title: 'Components/PaginationNav',
+ component: PaginationNav,
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
+ subcomponents: {},
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ },
+};
+
+export const Default = (args) => {
+ return (
+
+ );
};
diff --git a/packages/react/src/components/Plex/Plex.stories.js b/packages/react/src/components/Plex/Plex.stories.js
index c5fc271186b2..6e21ce0e6c0f 100644
--- a/packages/react/src/components/Plex/Plex.stories.js
+++ b/packages/react/src/components/Plex/Plex.stories.js
@@ -24,9 +24,15 @@ export default {
},
options: ['Light', 'Regular', 'SemiBold'],
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
args: {
fontWeight: 'Regular',
+ theme: 'g10',
},
};
diff --git a/packages/react/src/components/Popover/Popover.stories.js b/packages/react/src/components/Popover/Popover.stories.js
index 6815ed4d9b2c..6e7fc6fc44fa 100644
--- a/packages/react/src/components/Popover/Popover.stories.js
+++ b/packages/react/src/components/Popover/Popover.stories.js
@@ -19,13 +19,76 @@ import OverflowMenu from '../OverflowMenu/OverflowMenu';
import OverflowMenuItem from '../OverflowMenuItem';
const prefix = 'cds';
+const Defaultargs = {
+ caret: true,
+ dropShadow: true,
+ highContrast: false,
+ open: true,
+ theme: 'g10',
+};
+
+const DefaultargTypes = {
+ align: {
+ options: [
+ 'top',
+ 'top-start',
+ 'top-end',
+
+ 'bottom',
+ 'bottom-start',
+ 'bottom-end',
+ 'left',
+ 'left-end',
+ 'left-start',
+
+ 'right',
+ 'right-end',
+ 'right-start',
+ ],
+ control: {
+ type: 'select',
+ },
+ },
+ border: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ caret: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ dropShadow: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ highContrast: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ open: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/Popover',
component: Popover,
subcomponents: {
PopoverContent,
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
parameters: {
controls: {
hideNoControlsWarning: true,
@@ -170,63 +233,6 @@ TabTip.argTypes = {
export const Default = DefaultStory.bind({});
-Default.args = {
- caret: true,
- dropShadow: true,
- highContrast: false,
- open: true,
-};
-
-Default.argTypes = {
- align: {
- options: [
- 'top',
- 'top-start',
- 'top-end',
-
- 'bottom',
- 'bottom-start',
- 'bottom-end',
-
- 'left',
- 'left-end',
- 'left-start',
-
- 'right',
- 'right-end',
- 'right-start',
- ],
- control: {
- type: 'select',
- },
- },
- border: {
- control: {
- type: 'boolean',
- },
- },
- caret: {
- control: {
- type: 'boolean',
- },
- },
- dropShadow: {
- control: {
- type: 'boolean',
- },
- },
- highContrast: {
- control: {
- type: 'boolean',
- },
- },
- open: {
- control: {
- type: 'boolean',
- },
- },
-};
-
Default.story = {
decorators: [
(story) =>
{story()}
,
diff --git a/packages/react/src/components/ProgressBar/ProgressBar.stories.js b/packages/react/src/components/ProgressBar/ProgressBar.stories.js
index b9ffdc6a2092..c33ff8b76321 100644
--- a/packages/react/src/components/ProgressBar/ProgressBar.stories.js
+++ b/packages/react/src/components/ProgressBar/ProgressBar.stories.js
@@ -11,7 +11,23 @@ import { WithLayer } from '../../../.storybook/templates/WithLayer';
import mdx from './ProgressBar.mdx';
import ProgressBar from './';
-
+const DefaultargTypes = {
+ hideLabel: {
+ control: { type: 'boolean' },
+ },
+ status: {
+ options: ['active', 'finished', 'error'],
+ control: { type: 'select' },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+const Defaultargs = {
+ theme: 'g10',
+};
export default {
title: 'Components/ProgressBar',
component: ProgressBar,
@@ -20,6 +36,8 @@ export default {
page: mdx,
},
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
};
const DefaultStory = (args) => {
@@ -34,16 +52,6 @@ const DefaultStory = (args) => {
export const Default = DefaultStory.bind({});
-Default.argTypes = {
- hideLabel: {
- control: { type: 'boolean' },
- },
- status: {
- options: ['active', 'finished', 'error'],
- control: { type: 'select' },
- },
-};
-
export const Indeterminate = () => (
);
diff --git a/packages/react/src/components/ProgressIndicator/ProgressIndicator.stories.js b/packages/react/src/components/ProgressIndicator/ProgressIndicator.stories.js
index aad80294a5dc..93c04cfbb866 100644
--- a/packages/react/src/components/ProgressIndicator/ProgressIndicator.stories.js
+++ b/packages/react/src/components/ProgressIndicator/ProgressIndicator.stories.js
@@ -8,7 +8,29 @@
import React from 'react';
import { ProgressIndicator, ProgressStep, ProgressIndicatorSkeleton } from './';
import mdx from './ProgressIndicator.mdx';
+const Defaultargs = {
+ currentIndex: 0,
+ spaceEqually: false,
+ vertical: false,
+ theme: 'g10',
+};
+const DefaultargTypes = {
+ currentIndex: {
+ control: { type: 'number' },
+ },
+ spaceEqually: {
+ control: { type: 'boolean' },
+ },
+ vertical: {
+ control: { type: 'boolean' },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/ProgressIndicator',
component: ProgressIndicator,
@@ -21,6 +43,8 @@ export default {
page: mdx,
},
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
};
export const Interactive = () => {
@@ -76,21 +100,3 @@ export const Default = (args) => (
/>
);
-
-Default.args = {
- currentIndex: 0,
- spaceEqually: false,
- vertical: false,
-};
-
-Default.argTypes = {
- currentIndex: {
- control: { type: 'number' },
- },
- spaceEqually: {
- control: { type: 'boolean' },
- },
- vertical: {
- control: { type: 'boolean' },
- },
-};
diff --git a/packages/react/src/components/RadioButton/RadioButton.stories.js b/packages/react/src/components/RadioButton/RadioButton.stories.js
index e246430886d1..4fb6c8d34e67 100644
--- a/packages/react/src/components/RadioButton/RadioButton.stories.js
+++ b/packages/react/src/components/RadioButton/RadioButton.stories.js
@@ -14,7 +14,81 @@ import { AILabel, AILabelContent, AILabelActions } from '../AILabel';
import { IconButton } from '../IconButton';
import { View, FolderOpen, Folders } from '@carbon/icons-react';
import mdx from './RadioButton.mdx';
+const Defaultargs = {
+ defaultSelected: 'radio-2',
+ helperText: 'Helper text',
+ hideLabel: false,
+ invalidText: 'Invalid selection',
+ warn: false,
+ warnText: 'Please notice the warning',
+ theme: 'g10',
+};
+const DefaultargTypes = {
+ defaultSelected: {
+ description: 'Specify the `
` to be selected by default',
+ options: ['radio-1', 'radio-2', 'radio-3'],
+ control: {
+ type: 'select',
+ },
+ },
+ readOnly: {
+ description: 'Specify whether the RadioButtonGroup is read-only',
+ control: {
+ type: 'boolean',
+ },
+ },
+ helperText: {
+ description:
+ 'Provide text that is used alongside the control label for additional help',
+ control: {
+ type: 'text',
+ },
+ },
+ hideLabel: {
+ description:
+ 'Specify whether the label should be visually hidden but still available to screen readers',
+ control: {
+ type: 'boolean',
+ },
+ },
+ invalid: {
+ description: 'Specify whether the RadioButtonGroup is invalid',
+ control: {
+ type: 'boolean',
+ },
+ },
+ invalidText: {
+ description:
+ 'Provide the text that is displayed when the control is in an invalid state',
+ control: {
+ type: 'text',
+ },
+ },
+ orientation: {
+ description: 'Provide how radio buttons should be displayed',
+ control: 'select',
+ options: ['horizontal', 'vertical'],
+ },
+ warn: {
+ description: 'Specify whether the control is currently in warning state',
+ control: {
+ type: 'boolean',
+ },
+ },
+ warnText: {
+ description:
+ 'Provide the text that is displayed when the control is in warning state',
+ control: {
+ type: 'text',
+ },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/RadioButton',
component: RadioButton,
@@ -39,6 +113,8 @@ export default {
page: mdx,
},
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
};
export const Vertical = () => {
@@ -207,73 +283,3 @@ export const Default = (args) => {
);
};
-
-Default.args = {
- defaultSelected: 'radio-2',
- helperText: 'Helper text',
- hideLabel: false,
- invalidText: 'Invalid selection',
- warn: false,
- warnText: 'Please notice the warning',
-};
-
-Default.argTypes = {
- defaultSelected: {
- description: 'Specify the `` to be selected by default',
- options: ['radio-1', 'radio-2', 'radio-3'],
- control: {
- type: 'select',
- },
- },
- readOnly: {
- description: 'Specify whether the RadioButtonGroup is read-only',
- control: {
- type: 'boolean',
- },
- },
- helperText: {
- description:
- 'Provide text that is used alongside the control label for additional help',
- control: {
- type: 'text',
- },
- },
- hideLabel: {
- description:
- 'Specify whether the label should be visually hidden but still available to screen readers',
- control: {
- type: 'boolean',
- },
- },
- invalid: {
- description: 'Specify whether the RadioButtonGroup is invalid',
- control: {
- type: 'boolean',
- },
- },
- invalidText: {
- description:
- 'Provide the text that is displayed when the control is in an invalid state',
- control: {
- type: 'text',
- },
- },
- orientation: {
- description: 'Provide how radio buttons should be displayed',
- control: 'select',
- options: ['horizontal', 'vertical'],
- },
- warn: {
- description: 'Specify whether the control is currently in warning state',
- control: {
- type: 'boolean',
- },
- },
- warnText: {
- description:
- 'Provide the text that is displayed when the control is in warning state',
- control: {
- type: 'text',
- },
- },
-};
diff --git a/packages/react/src/components/Search/Search.stories.js b/packages/react/src/components/Search/Search.stories.js
index fbbfdb2a7e8f..9b74629f6bc9 100644
--- a/packages/react/src/components/Search/Search.stories.js
+++ b/packages/react/src/components/Search/Search.stories.js
@@ -12,7 +12,60 @@ import { WithLayer } from '../../../.storybook/templates/WithLayer';
import ExpandableSearch from '../ExpandableSearch';
import Search from '.';
import mdx from './Search.mdx';
+const Defaultargs = {
+ closeButtonLabelText: 'Clear search input',
+ disabled: false,
+ labelText: 'Label text',
+ placeholder: 'Placeholder text',
+ size: 'md',
+ type: 'search',
+ theme: 'g10',
+};
+const DefaultargTypes = {
+ defaultWidth: {
+ control: { type: 'range', min: 300, max: 800, step: 50 },
+ },
+ closeButtonLabelText: {
+ control: {
+ type: 'text',
+ },
+ },
+ disabled: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ defaultValue: {
+ control: {
+ type: 'text',
+ },
+ },
+ labelText: {
+ control: {
+ type: 'text',
+ },
+ },
+ placeholder: {
+ control: {
+ type: 'text',
+ },
+ },
+ renderIcon: {
+ control: false,
+ },
+ size: {
+ options: ['sm', 'md', 'lg'],
+ control: {
+ type: 'select',
+ },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/Search',
component: Search,
@@ -26,6 +79,8 @@ export default {
subcomponents: {
ExpandableSearch,
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
parameters: {
docs: {
page: mdx,
@@ -109,52 +164,3 @@ export const Default = (args) => {
);
};
-
-Default.args = {
- closeButtonLabelText: 'Clear search input',
- disabled: false,
- labelText: 'Label text',
- placeholder: 'Placeholder text',
- size: 'md',
- type: 'search',
-};
-
-Default.argTypes = {
- defaultWidth: {
- control: { type: 'range', min: 300, max: 800, step: 50 },
- },
- closeButtonLabelText: {
- control: {
- type: 'text',
- },
- },
- disabled: {
- control: {
- type: 'boolean',
- },
- },
- defaultValue: {
- control: {
- type: 'text',
- },
- },
- labelText: {
- control: {
- type: 'text',
- },
- },
- placeholder: {
- control: {
- type: 'text',
- },
- },
- renderIcon: {
- control: false,
- },
- size: {
- options: ['sm', 'md', 'lg'],
- control: {
- type: 'select',
- },
- },
-};
diff --git a/packages/react/src/components/Select/Select.stories.js b/packages/react/src/components/Select/Select.stories.js
index 7718090636db..d6c207167e70 100644
--- a/packages/react/src/components/Select/Select.stories.js
+++ b/packages/react/src/components/Select/Select.stories.js
@@ -29,6 +29,7 @@ export default {
invalid: false,
warn: false,
size: 'md',
+ theme: 'g10',
},
argTypes: {
light: {
@@ -36,6 +37,11 @@ export default {
disable: true,
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
decorators: [(story) =>
diff --git a/packages/react/src/components/Tabs/Tabs.stories.js b/packages/react/src/components/Tabs/Tabs.stories.js
index f7ea84255a30..173acc3bba16 100644
--- a/packages/react/src/components/Tabs/Tabs.stories.js
+++ b/packages/react/src/components/Tabs/Tabs.stories.js
@@ -39,7 +39,61 @@ import {
Restart,
Icon,
} from '@carbon/icons-react';
+const Defaultargs = {
+ contained: false,
+ dismissable: false,
+ scrollDebounceWait: 200,
+ theme: 'g10',
+};
+const DefaultargTypes = {
+ activation: {
+ control: { type: 'select' },
+ options: ['automatic', 'manual'],
+ },
+ contained: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ dismissable: {
+ control: false,
+ },
+ iconSize: {
+ control: { type: 'select' },
+ options: ['default', 'lg'],
+ },
+ leftOverflowButtonProps: {
+ control: {
+ type: 'object',
+ },
+ },
+ rightOverflowButtonProps: {
+ control: {
+ type: 'object',
+ },
+ },
+ scrollDebounceWait: {
+ control: {
+ type: 'number',
+ },
+ },
+ scrollIntoView: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ light: {
+ table: {
+ disable: true,
+ },
+ },
+};
export default {
title: 'Components/Tabs',
component: Tabs,
@@ -63,6 +117,8 @@ export default {
},
},
},
+ argTypes: DefaultargTypes,
+ args: Defaultargs,
};
export const Default = (args) => {
@@ -84,51 +140,6 @@ export const Default = (args) => {
);
};
-Default.args = {
- contained: false,
- dismissable: false,
- scrollDebounceWait: 200,
-};
-
-Default.argTypes = {
- activation: {
- control: { type: 'select' },
- options: ['automatic', 'manual'],
- },
- contained: {
- control: {
- type: 'boolean',
- },
- },
- dismissable: {
- control: false,
- },
- iconSize: {
- control: { type: 'select' },
- options: ['default', 'lg'],
- },
- leftOverflowButtonProps: {
- control: {
- type: 'object',
- },
- },
- rightOverflowButtonProps: {
- control: {
- type: 'object',
- },
- },
- scrollDebounceWait: {
- control: {
- type: 'number',
- },
- },
- scrollIntoView: {
- control: {
- type: 'boolean',
- },
- },
-};
-
export const Dismissable = () => {
const tabs = [
{
diff --git a/packages/react/src/components/Tag/Tag.stories.js b/packages/react/src/components/Tag/Tag.stories.js
index 446cb0bc1afa..d8e7831d918b 100644
--- a/packages/react/src/components/Tag/Tag.stories.js
+++ b/packages/react/src/components/Tag/Tag.stories.js
@@ -16,10 +16,62 @@ import { IconButton } from '../IconButton';
import '../AILabel/ailabel-story.scss';
import mdx from './Tag.mdx';
import './story.scss';
+const ReadOnlyargs = {
+ disabled: false,
+ filter: false,
+ size: 'md',
+ title: 'Clear filter',
+ theme: 'g10',
+};
+const ReadOnlyargTypes = {
+ children: {
+ control: false,
+ },
+ className: {
+ control: false,
+ },
+ disabled: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ filter: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ id: {
+ control: false,
+ },
+ renderIcon: {
+ control: false,
+ },
+ size: {
+ options: ['sm', 'md', 'lg'],
+ control: {
+ type: 'select',
+ },
+ },
+ title: {
+ control: {
+ type: 'text',
+ },
+ },
+ type: {
+ control: false,
+ },
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
export default {
title: 'Components/Tag',
component: Tag,
+ argTypes: ReadOnlyargTypes,
+ args: ReadOnlyargs,
parameters: {
docs: {
page: mdx,
@@ -70,52 +122,6 @@ export const ReadOnly = (args) => {
);
};
-ReadOnly.args = {
- disabled: false,
- filter: false,
- size: 'md',
- title: 'Clear filter',
-};
-
-ReadOnly.argTypes = {
- children: {
- control: false,
- },
- className: {
- control: false,
- },
- disabled: {
- control: {
- type: 'boolean',
- },
- },
- filter: {
- control: {
- type: 'boolean',
- },
- },
- id: {
- control: false,
- },
- renderIcon: {
- control: false,
- },
- size: {
- options: ['sm', 'md', 'lg'],
- control: {
- type: 'select',
- },
- },
- title: {
- control: {
- type: 'text',
- },
- },
- type: {
- control: false,
- },
-};
-
export const Skeleton = (args) => (
diff --git a/packages/react/src/components/Text/Text.stories.js b/packages/react/src/components/Text/Text.stories.js
index f5fa53422884..7218abcfa915 100644
--- a/packages/react/src/components/Text/Text.stories.js
+++ b/packages/react/src/components/Text/Text.stories.js
@@ -25,6 +25,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = () => {
diff --git a/packages/react/src/components/TextArea/TextArea.stories.js b/packages/react/src/components/TextArea/TextArea.stories.js
index 195c1693de8a..2c5dcdf36f37 100644
--- a/packages/react/src/components/TextArea/TextArea.stories.js
+++ b/packages/react/src/components/TextArea/TextArea.stories.js
@@ -15,32 +15,22 @@ import { IconButton } from '../IconButton';
import { default as TextArea, TextAreaSkeleton } from './';
import { Tooltip } from '../Tooltip';
import mdx from './TextArea.mdx';
-
-export default {
- title: 'Components/TextArea',
- component: TextArea,
- parameters: {
- docs: {
- page: mdx,
- },
- },
- subcomponents: {
- TextAreaSkeleton,
- },
- argTypes: {
- light: {
- table: {
- disable: true,
- },
- },
- slug: {
- table: {
- disable: true,
- },
- },
- },
+const Defaultargs = {
+ enableCounter: true,
+ helperText: 'TextArea helper text',
+ labelText: 'TextArea label',
+ maxCount: 500,
+ disabled: false,
+ hideLabel: false,
+ invalid: false,
+ invalidText:
+ 'Error message that is really long can wrap to more lines but should not be excessively long.',
+ placeholder: '',
+ rows: 4,
+ warn: false,
+ warnText: 'This is a warning message.',
+ theme: 'g10',
};
-
const sharedArgTypes = {
className: {
control: false,
@@ -123,6 +113,47 @@ const sharedArgTypes = {
type: 'text',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ light: {
+ table: {
+ disable: true,
+ },
+ },
+ slug: {
+ table: {
+ disable: true,
+ },
+ },
+};
+export default {
+ title: 'Components/TextArea',
+ component: TextArea,
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ },
+ subcomponents: {
+ TextAreaSkeleton,
+ },
+ argTypes: sharedArgTypes,
+ args: Defaultargs,
+ argTypes: {
+ light: {
+ table: {
+ disable: true,
+ },
+ },
+ slug: {
+ table: {
+ disable: true,
+ },
+ },
+ },
};
export const Default = (args) => {
@@ -133,22 +164,6 @@ Default.argTypes = {
...sharedArgTypes,
};
-Default.args = {
- enableCounter: true,
- helperText: 'TextArea helper text',
- labelText: 'TextArea label',
- maxCount: 500,
- disabled: false,
- hideLabel: false,
- invalid: false,
- invalidText:
- 'Error message that is really long can wrap to more lines but should not be excessively long.',
- placeholder: '',
- rows: 4,
- warn: false,
- warnText: 'This is a warning message.',
-};
-
export const _WithLayer = () => (
{(layer) => (
diff --git a/packages/react/src/components/TextInput/TextInput.stories.js b/packages/react/src/components/TextInput/TextInput.stories.js
index 8c962d5c1973..2de3d6aa3375 100644
--- a/packages/react/src/components/TextInput/TextInput.stories.js
+++ b/packages/react/src/components/TextInput/TextInput.stories.js
@@ -16,32 +16,6 @@ import mdx from './TextInput.mdx';
import { default as TextInput, TextInputSkeleton } from '../TextInput';
import { Tooltip } from '../Tooltip';
-
-export default {
- title: 'Components/TextInput',
- component: TextInput,
- parameters: {
- docs: {
- page: mdx,
- },
- },
- subcomponents: {
- TextInputSkeleton,
- },
- argTypes: {
- light: {
- table: {
- disable: true,
- },
- },
- slug: {
- table: {
- disable: true,
- },
- },
- },
-};
-
const sharedArgTypes = {
defaultWidth: {
control: { type: 'range', min: 300, max: 800, step: 50 },
@@ -113,6 +87,39 @@ const sharedArgTypes = {
type: 'select',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+};
+export default {
+ title: 'Components/TextInput',
+ component: TextInput,
+ parameters: {
+ docs: {
+ page: mdx,
+ },
+ },
+ subcomponents: {
+ TextInputSkeleton,
+ },
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ ...sharedArgTypes,
+ light: {
+ table: {
+ disable: true,
+ },
+ },
+ slug: {
+ table: {
+ disable: true,
+ },
+ },
+ },
};
export const Default = (args) => {
@@ -136,6 +143,7 @@ Default.args = {
warnText:
'Warning message that is really long can wrap to more lines but should not be excessively long.',
size: 'md',
+ theme: 'g10',
};
Default.argTypes = {
diff --git a/packages/react/src/components/Theme/Theme.stories.js b/packages/react/src/components/Theme/Theme.stories.js
index cc2895140a41..8104356523cf 100644
--- a/packages/react/src/components/Theme/Theme.stories.js
+++ b/packages/react/src/components/Theme/Theme.stories.js
@@ -31,6 +31,13 @@ export default {
args: {
theme: 'g10',
},
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
const ThemeText = ({ children, showIsDark }) => {
diff --git a/packages/react/src/components/Tile/Tile.stories.js b/packages/react/src/components/Tile/Tile.stories.js
index a440f9af285b..7415ebd8e838 100644
--- a/packages/react/src/components/Tile/Tile.stories.js
+++ b/packages/react/src/components/Tile/Tile.stories.js
@@ -50,6 +50,9 @@ export default {
TileAboveTheFoldContent,
TileBelowTheFoldContent,
},
+ args: {
+ theme: 'g10',
+ },
argTypes: {
light: {
table: {
@@ -61,6 +64,11 @@ export default {
disable: true,
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
parameters: {
docs: {
@@ -114,6 +122,11 @@ Clickable.argTypes = {
type: 'boolean',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const ClickableWithCustomIcon = (args) => {
@@ -132,13 +145,7 @@ ClickableWithCustomIcon.args = {
disabled: false,
};
-ClickableWithCustomIcon.argTypes = {
- disabled: {
- control: {
- type: 'boolean',
- },
- },
-};
+ClickableWithCustomIcon.argTypes = Clickable.argTypes;
export const ClickableWithLayer = () => (
@@ -164,13 +171,7 @@ Selectable.args = {
disabled: false,
};
-Selectable.argTypes = {
- disabled: {
- control: {
- type: 'boolean',
- },
- },
-};
+Selectable.argTypes = Clickable.argTypes;
export const MultiSelect = (args) => {
return (
@@ -192,13 +193,7 @@ MultiSelect.args = {
disabled: false,
};
-MultiSelect.argTypes = {
- disabled: {
- control: {
- type: 'boolean',
- },
- },
-};
+MultiSelect.argTypes = Clickable.argTypes;
export const Radio = (args) => {
return (
@@ -232,13 +227,7 @@ Radio.args = {
disabled: false,
};
-Radio.argTypes = {
- disabled: {
- control: {
- type: 'boolean',
- },
- },
-};
+Radio.argTypes = Clickable.argTypes;
export const RadioWithLayer = () => (
diff --git a/packages/react/src/components/Toggle/Toggle.stories.js b/packages/react/src/components/Toggle/Toggle.stories.js
index 09cea7042772..5dca4acb4bcf 100644
--- a/packages/react/src/components/Toggle/Toggle.stories.js
+++ b/packages/react/src/components/Toggle/Toggle.stories.js
@@ -19,6 +19,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = (args) => {
@@ -75,6 +85,11 @@ Default.argTypes = {
control: { type: 'select' },
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const SmallToggle = (args) => {
diff --git a/packages/react/src/components/Toggletip/Toggletip.stories.js b/packages/react/src/components/Toggletip/Toggletip.stories.js
index 7691282d630f..afc80714c41a 100644
--- a/packages/react/src/components/Toggletip/Toggletip.stories.js
+++ b/packages/react/src/components/Toggletip/Toggletip.stories.js
@@ -33,6 +33,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const ExperimentalAutoAlign = () => {
diff --git a/packages/react/src/components/Tooltip/DefinitionTooltip.stories.js b/packages/react/src/components/Tooltip/DefinitionTooltip.stories.js
index 9138de7ec5cb..6f0dbff6ed6c 100644
--- a/packages/react/src/components/Tooltip/DefinitionTooltip.stories.js
+++ b/packages/react/src/components/Tooltip/DefinitionTooltip.stories.js
@@ -14,6 +14,16 @@ import mdx from './DefinitionTooltip.mdx';
export default {
title: 'Components/DefinitionTooltip',
component: DefinitionTooltip,
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
+ args: {
+ theme: 'g10',
+ },
parameters: {
controls: {
hideNoControlsWarning: true,
diff --git a/packages/react/src/components/Tooltip/Tooltip.stories.js b/packages/react/src/components/Tooltip/Tooltip.stories.js
index f810bb8ca16a..77856cec7244 100644
--- a/packages/react/src/components/Tooltip/Tooltip.stories.js
+++ b/packages/react/src/components/Tooltip/Tooltip.stories.js
@@ -25,6 +25,9 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
argTypes: {
align: {
options: [
@@ -47,6 +50,11 @@ export default {
control: {
type: 'select',
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
highContrast: {
table: {
diff --git a/packages/react/src/components/TreeView/Treeview.stories.js b/packages/react/src/components/TreeView/Treeview.stories.js
index 41594c5de38b..828292e18fc9 100644
--- a/packages/react/src/components/TreeView/Treeview.stories.js
+++ b/packages/react/src/components/TreeView/Treeview.stories.js
@@ -50,6 +50,14 @@ export default {
},
args: {
onSelect: action('onSelect'),
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
},
};
@@ -241,6 +249,11 @@ Default.argTypes = {
options: ['xs', 'sm'],
control: { type: 'select' },
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const WithIcons = () => {
diff --git a/packages/react/src/components/UnorderedList/UnorderedList.stories.js b/packages/react/src/components/UnorderedList/UnorderedList.stories.js
index 0f790a8edce7..bc9c9dd3cdc9 100644
--- a/packages/react/src/components/UnorderedList/UnorderedList.stories.js
+++ b/packages/react/src/components/UnorderedList/UnorderedList.stories.js
@@ -22,6 +22,16 @@ export default {
page: mdx,
},
},
+ args: {
+ theme: 'g10',
+ },
+ argTypes: {
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
+ },
};
export const Default = (args) => {
@@ -44,6 +54,11 @@ Default.argTypes = {
type: 'boolean',
},
},
+ theme: {
+ options: ['white', 'g10', 'g90', 'g100'],
+ control: { type: 'select' },
+ description: 'The theme to apply to the component.',
+ },
};
export const Nested = () => {