@leafygreen-ui/lib
Advanced tools
Comparing version 10.3.1 to 10.3.2
# @leafygreen-ui/lib | ||
## 10.3.2 | ||
### Patch Changes | ||
- 8c0c2bdf9: Updates build script to include a transpiled copy of the story file in the bundle | ||
## 10.3.1 | ||
@@ -4,0 +10,0 @@ |
import { ComponentMeta } from '@storybook/react'; | ||
import { ComponentProps } from 'react'; | ||
import DarkModeProps from '../DarkModeProps'; | ||
import { StoryArgType } from './storybookArgTypes'; | ||
export interface StoryMeta<T extends React.ElementType> extends Omit<ComponentMeta<T>, 'component'> { | ||
interface LeafyGreenProviderProps extends DarkModeProps { | ||
baseFontSize?: number; | ||
} | ||
export interface StoryMeta<T extends React.ElementType, XP extends Record<string, any> = {}> extends Omit<ComponentMeta<T>, 'component' | 'argTypes' | 'args'> { | ||
parameters: ComponentMeta<T>['parameters'] & { | ||
@@ -12,7 +16,13 @@ /** | ||
argTypes?: Partial<{ | ||
[name in keyof ComponentProps<T>]: StoryArgType; | ||
[key in keyof ComponentProps<T>]: StoryArgType; | ||
} | { | ||
[key in keyof LeafyGreenProviderProps]: StoryArgType; | ||
} | { | ||
[key in keyof XP]: StoryArgType; | ||
}>; | ||
args?: Partial<ComponentProps<T> | LeafyGreenProviderProps | XP>; | ||
component?: T; | ||
} | ||
export declare const StoryMeta: <T extends import("react").ElementType<any>>(meta?: StoryMeta<T>) => StoryMeta<T>; | ||
export declare const StoryMeta: <T extends import("react").ElementType<any>>(meta?: StoryMeta<T, {}>) => StoryMeta<T, {}>; | ||
export {}; | ||
//# sourceMappingURL=StoryMeta.d.ts.map |
{ | ||
"name": "@leafygreen-ui/lib", | ||
"version": "10.3.1", | ||
"version": "10.3.2", | ||
"description": "leafyGreen UI Kit Internal Library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
import { ComponentMeta } from '@storybook/react'; | ||
import mergeWith from 'lodash/mergeWith'; | ||
import { ComponentProps } from 'react'; | ||
import DarkModeProps from '../DarkModeProps'; | ||
import { StoryArgType, storybookArgTypes } from './storybookArgTypes'; | ||
import { storybookExcludedControlParams } from './storybookExcludedControlParams'; | ||
export interface StoryMeta<T extends React.ElementType> | ||
extends Omit<ComponentMeta<T>, 'component'> { | ||
// Re-defining LG provider prop keys here since importing from the package | ||
// will cause circular dependencies | ||
interface LeafyGreenProviderProps extends DarkModeProps { | ||
baseFontSize?: number; | ||
} | ||
export interface StoryMeta< | ||
T extends React.ElementType, | ||
XP extends Record<string, any> = {}, | ||
> extends Omit<ComponentMeta<T>, 'component' | 'argTypes' | 'args'> { | ||
parameters: ComponentMeta<T>['parameters'] & { | ||
@@ -15,5 +25,14 @@ /** | ||
}; | ||
argTypes?: Partial<{ | ||
[name in keyof ComponentProps<T>]: StoryArgType; | ||
}>; | ||
argTypes?: Partial< | ||
| { | ||
[key in keyof ComponentProps<T>]: StoryArgType; | ||
} | ||
| { | ||
[key in keyof LeafyGreenProviderProps]: StoryArgType; | ||
} | ||
| { | ||
[key in keyof XP]: StoryArgType; | ||
} | ||
>; | ||
args?: Partial<ComponentProps<T> | LeafyGreenProviderProps | XP>; | ||
component?: T; | ||
@@ -20,0 +39,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
274365
3499