Skip to content

Commit

Permalink
Migrate examples and templates to PascalCase exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Nov 19, 2019
1 parent 66a79bc commit 24ec9d3
Show file tree
Hide file tree
Showing 181 changed files with 720 additions and 720 deletions.
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/addon-actions.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ export default {
title: 'Addon/Actions',
};

export const actionOnly = () => ({
export const ActionOnly = () => ({
component: Button,
props: {
text: 'Action only',
onClick: action('log 1'),
},
});

actionOnly.story = {
ActionOnly.story = {
name: 'Action only',
};

export const actionAndMethod = () => ({
export const ActionAndMethod = () => ({
component: Button,
props: {
text: 'Action and Method',
Expand All @@ -29,6 +29,6 @@ export const actionAndMethod = () => ({
},
});

actionAndMethod.story = {
ActionAndMethod.story = {
name: 'Action and method',
};
4 changes: 2 additions & 2 deletions examples/angular-cli/src/stories/addon-jest.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export default {
],
};

export const appComponentWithJestTests = () => ({
export const AppComponentWithJestTests = () => ({
component: AppComponent,
props: {},
});

appComponentWithJestTests.story = {
AppComponentWithJestTests.story = {
name: 'app.component with jest tests',

parameters: {
Expand Down
12 changes: 6 additions & 6 deletions examples/angular-cli/src/stories/addon-knobs.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
},
};

export const simple = () => {
export const Simple = () => {
const name = text('name', 'John Doe');
const age = number('age', 0);
const phoneNumber = text('phoneNumber', '555-55-55');
Expand All @@ -53,11 +53,11 @@ export const simple = () => {
};
};

simple.story = {
Simple.story = {
name: 'Simple',
};

export const allKnobs = () => {
export const AllKnobs = () => {
const name = text('name', 'Jane');
const stock = number('stock', 20, {
range: true,
Expand Down Expand Up @@ -101,14 +101,14 @@ export const allKnobs = () => {
};
};

allKnobs.story = {
AllKnobs.story = {
name: 'All knobs',
};

export const xssSafety = () => ({
export const XssSafety = () => ({
template: text('Rendered string', '<img src=x onerror="alert(\'XSS Attack\')" >'),
});

xssSafety.story = {
XssSafety.story = {
name: 'XSS safety',
};
4 changes: 2 additions & 2 deletions examples/angular-cli/src/stories/addon-links.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ export default {
title: 'Addon/Links',
};

export const buttonWithLinkToAnotherStory = () => ({
export const ButtonWithLinkToAnotherStory = () => ({
component: Button,
props: {
text: 'Go to Welcome Story',
onClick: linkTo('Welcome'),
},
});

buttonWithLinkToAnotherStory.story = {
ButtonWithLinkToAnotherStory.story = {
name: 'button with link to another story',
};
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/addon-notes.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ export default {
title: 'Addon/Notes',
};

export const simpleNote = () => ({
export const SimpleNote = () => ({
component: Button,
props: {
text: 'Notes on some Button',
onClick: () => {},
},
});

simpleNote.story = {
SimpleNote.story = {
name: 'Simple note',
parameters: { notes: 'My notes on some button' },
};

export const noteWithHtml = () => ({
export const NoteWithHtml = () => ({
component: Button,
props: {
text: 'Notes with HTML',
onClick: () => {},
},
});

noteWithHtml.story = {
NoteWithHtml.story = {
name: 'Note with HTML',
parameters: {
notes: `
Expand Down
4 changes: 2 additions & 2 deletions examples/angular-cli/src/stories/app.component.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export default {
component: AppComponent,
};

export const componentWithSeparateTemplate = () => ({
export const ComponentWithSeparateTemplate = () => ({
component: AppComponent,
props: {},
});

componentWithSeparateTemplate.story = {
ComponentWithSeparateTemplate.story = {
name: 'Component with separate template',
parameters: { docs: { iframeHeight: 400 } },
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ export default {
title: 'Custom/Dependencies',
};

export const inputsAndInjectDependencies = () => ({
export const InputsAndInjectDependencies = () => ({
component: DiComponent,
props: {
title: 'Component dependencies',
},
});

inputsAndInjectDependencies.story = {
InputsAndInjectDependencies.story = {
name: 'inputs and inject dependencies',
};

export const inputsAndInjectDependenciesWithKnobs = () => ({
export const InputsAndInjectDependenciesWithKnobs = () => ({
component: DiComponent,
props: {
title: text('title', 'Component dependencies'),
},
});

inputsAndInjectDependenciesWithKnobs.story = {
InputsAndInjectDependenciesWithKnobs.story = {
name: 'inputs and inject dependencies with knobs',
decorators: [withKnobs],
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ export default {
title: 'Custom/styleUrls',
};

export const componentWithStyles = () => ({
export const ComponentWithStyles = () => ({
component: StyledComponent,
});

componentWithStyles.story = {
ComponentWithStyles.story = {
name: 'Component with styles',
};
4 changes: 2 additions & 2 deletions examples/angular-cli/src/stories/core.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default {
},
};

export const passedToStory = ({ parameters: { fileName, ...parameters } }) => ({
export const PassedToStory = ({ parameters: { fileName, ...parameters } }) => ({
component: Button,
props: {
text: `Parameters are ${JSON.stringify(parameters)}`,
onClick: () => 0,
},
});

passedToStory.story = {
PassedToStory.story = {
name: 'passed to story',
parameters: { storyParameter },
};
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/custom-pipes.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ export default {
],
};

export const simple = () => ({
export const Simple = () => ({
component: NameComponent,
props: {
field: 'foobar',
},
});

simple.story = {
Simple.story = {
name: 'Simple',
};

export const withKnobsStory = () => ({
export const WithKnobsStory = () => ({
component: NameComponent,
props: {
field: text('field', 'foobar'),
},
});

withKnobsStory.story = {
WithKnobsStory.story = {
name: 'With Knobs',
decorators: [withKnobs],
};
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/custom-providers.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ export default {
],
};

export const simple = () => ({
export const Simple = () => ({
component: ServiceComponent,
props: {
name: 'Static name',
},
});

simple.story = {
Simple.story = {
name: 'Simple',
};

export const withKnobsStory = () => {
export const WithKnobsStory = () => {
const name = text('name', 'Dynamic knob');

return {
Expand All @@ -38,7 +38,7 @@ export const withKnobsStory = () => {
};
};

withKnobsStory.story = {
WithKnobsStory.story = {
name: 'With knobs',
decorators: [withKnobs],
};
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/custom-styles.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
],
};

export const defaultStory = () => ({
export const DefaultStory = () => ({
template: `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>`,
props: {
text: 'Button with custom styles',
Expand All @@ -28,11 +28,11 @@ export const defaultStory = () => ({
],
});

defaultStory.story = {
DefaultStory.story = {
name: 'Default',
};

export const withKnobsStory = () => ({
export const WithKnobsStory = () => ({
template: `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>`,
props: {
text: text('text', 'Button with custom styles'),
Expand All @@ -48,7 +48,7 @@ export const withKnobsStory = () => ({
],
});

withKnobsStory.story = {
WithKnobsStory.story = {
name: 'With Knobs',
decorators: [withKnobs],
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export default {
title: 'Custom/ngModel',
};

export const customControlValueAccessor = () => ({
export const CustomControlValueAccessor = () => ({
component: CustomCvaComponent,
props: {
ngModel: 'Type anything',
ngModelChange: action('ngModelChnange'),
},
});

customControlValueAccessor.story = {
CustomControlValueAccessor.story = {
name: 'custom ControlValueAccessor',
parameters: { notes: description },
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
parameters: { docs: { iframeHeight: 120 } },
};

export const basic = () => ({
export const Basic = () => ({
component: ButtonComponent,
props: {
label: 'Docs Test',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ export default {
title: 'Custom/Inheritance',
};

export const iconButton = () => ({
export const IconButton = () => ({
component: IconButtonComponent,
props: {
icon: 'this is icon',
label: 'this is label',
},
});

iconButton.story = {
IconButton.story = {
name: 'icon button',
};

export const baseButton = () => ({
export const BaseButton = () => ({
component: BaseButtonComponent,
props: {
label: 'this is label',
},
});

baseButton.story = {
BaseButton.story = {
name: 'base button',
};
8 changes: 4 additions & 4 deletions examples/angular-cli/src/stories/metadata-combined.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ export default {
],
};

export const combined1 = () => ({
export const Combined1 = () => ({
template: `<storybook-simple-token-component [name]="name"></storybook-simple-token-component>`,
props: {
name: 'Prop Name',
},
});

combined1.story = {
Combined1.story = {
name: 'Combined 1',
};

export const combined2 = () => ({
export const Combined2 = () => ({
template: `<storybook-simple-token-component [name]="name | customPipe"></storybook-simple-token-component>`,
props: {
name: 'Prop Name',
Expand All @@ -43,6 +43,6 @@ export const combined2 = () => ({
},
});

combined2.story = {
Combined2.story = {
name: 'Combined 2',
};
Loading

0 comments on commit 24ec9d3

Please sign in to comment.