@kadconsulting/dry
Version:
KAD Reusable Component Library
53 lines • 1.54 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import InfoText from './InfoText';
export default {
title: 'Components/InfoText',
component: InfoText,
argTypes: {
'data-testid': {
control: 'text',
description: 'ID for testing purposes',
defaultValue: 'InfoText-test-id',
},
passProps: {
control: 'object',
description: 'Object containing extra props to pass',
defaultValue: {},
},
text: {
control: 'text',
description: 'Text content of the InfoText',
},
className: {
control: 'text',
description: 'Additional CSS class names',
},
},
};
export const Default = {
args: {
'data-testid': 'InfoText-test-id',
text: 'This is an info text',
},
};
export const WithCustomClass = {
args: {
...Default.args,
className: 'custom-class',
text: 'Info text with custom class',
},
};
export const WithReactNodeContent = {
args: {
...Default.args,
text: (_jsxs("span", { children: ["Info text with ", _jsx("strong", { children: "formatted" }), " content"] })),
},
};
export const CustomRendering = {
render: (args) => (_jsx("div", { style: { padding: '20px', background: '#f0f0f0' }, children: _jsx(InfoText, { ...args }) })),
args: {
...Default.args,
text: 'Custom rendered info text',
},
};
//# sourceMappingURL=InfoText.stories.js.map