@dev-crew-berlin/enter-js-utils 0.9.1 → 0.9.2

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.
@@ -1,8 +1,8 @@
1
- import { FunctionComponent } from 'react';
2
- declare type Props = {
3
- segments: string[];
4
- activeSegment?: string;
5
- onChange: (segment: string) => void;
1
+ import { ReactElement } from 'react';
2
+ declare type Props<Segment extends string> = {
3
+ segments: Segment[];
4
+ activeSegment?: Segment;
5
+ onChange: (segment: Segment) => void;
6
6
  };
7
- export declare const SegmentedControl: FunctionComponent<Props>;
7
+ export declare const SegmentedControl: <Segment extends string>(props: Props<Segment>) => ReactElement;
8
8
  export {};
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { ComponentStory, ComponentMeta } from '@storybook/react';
3
- declare const _default: ComponentMeta<React.FunctionComponent<{
4
- segments: string[];
5
- activeSegment?: string | undefined;
6
- onChange: (segment: string) => void;
7
- }>>;
3
+ declare const _default: ComponentMeta<(<Segment extends string>(props: {
4
+ segments: Segment[];
5
+ activeSegment?: Segment | undefined;
6
+ onChange: (segment: Segment) => void;
7
+ }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>)>;
8
8
  export default _default;
9
- export declare const Basic: ComponentStory<React.FunctionComponent<{
10
- segments: string[];
11
- activeSegment?: string | undefined;
12
- onChange: (segment: string) => void;
13
- }>>;
9
+ export declare const Basic: ComponentStory<(<Segment extends string>(props: {
10
+ segments: Segment[];
11
+ activeSegment?: Segment | undefined;
12
+ onChange: (segment: Segment) => void;
13
+ }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>)>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-crew-berlin/enter-js-utils",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "utils such as vaildation and other helpers to work with data from the enter app",
5
5
  "files": [
6
6
  "dist",