@iress-oss/ids-storybook-config 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -271,7 +271,9 @@ const Ee = {
271
271
  IressTabSet: ne,
272
272
  IressText: te,
273
273
  useBreakpoint: re
274
- }, ve = /* @__PURE__ */ ee(Ee);
274
+ }, ve = /* @__PURE__ */ ee({
275
+ ...Ee
276
+ });
275
277
  export {
276
278
  Ee as C,
277
279
  ve as I,
@@ -0,0 +1,11 @@
1
+ import { GetSandboxProps } from '@iress-oss/ids-storybook-sandbox';
2
+ export interface CodeSandboxProps extends GetSandboxProps {
3
+ /**
4
+ * The title to show on the redirect panel
5
+ */
6
+ title?: string;
7
+ }
8
+ /**
9
+ * Component to redirect the user to a CodeSandbox URL within Storybook.
10
+ */
11
+ export declare const CodeSandbox: ({ files, title }: CodeSandboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Uses the string as the custom source for the story, when the generated story source is not sufficient.
3
+ *
4
+ * @param code Code to use as the custom source, usually imported as a raw string from a file: import { code } from './file.tsx?raw';
5
+ * @param language Language of the code to ensure it is highlighted correctly when shown to the user
6
+ * @returns {Record<string, any>} the parameters with the custom source added, usually passed to the story
7
+ */
8
+ export declare const withCustomSource: (code: string, language?: string) => Record<string, unknown>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './components/CodeSandbox';
1
2
  export * from './components/ComponentApi';
2
3
  export * from './components/ComponentApiExpander';
3
4
  export * from './components/ComponentExample';
@@ -12,6 +13,7 @@ export * from './helpers/disableArgTypes';
12
13
  export * from './helpers/mergeStorybookConfig';
13
14
  export * from './helpers/removeArgTypes';
14
15
  export * from './helpers/stringifyStorybookArgs';
16
+ export * from './helpers/withCustomSource';
15
17
  export * from './helpers/withJsxTransformer';
16
18
  export * from './helpers/withTransformedSource';
17
19
  export * from './constants';