-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#14079 - Allow usage of all component valid selectors
- Loading branch information
Showing
7 changed files
with
233 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ponent-with-complex-selectors/__snapshots__/multiple-selector.component.stories.storyshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Basics / Component / With Complex Selectors attribute selectors 1`] = ` | ||
<storybook-wrapper> | ||
<storybook-attribute-selector | ||
foo="" | ||
> | ||
<p> | ||
Attribute selector | ||
</p> | ||
</storybook-attribute-selector> | ||
</storybook-wrapper> | ||
`; | ||
|
||
exports[`Storyshots Basics / Component / With Complex Selectors attribute value selectors 1`] = ` | ||
<storybook-wrapper> | ||
<storybook-attribute-value-selector | ||
foo="bar" | ||
> | ||
<p> | ||
Attribute with value | ||
</p> | ||
</storybook-attribute-value-selector> | ||
</storybook-wrapper> | ||
`; | ||
|
||
exports[`Storyshots Basics / Component / With Complex Selectors multiple selectors 1`] = ` | ||
<storybook-wrapper> | ||
<storybook-multiple-selector> | ||
<p> | ||
Multiple selector | ||
</p> | ||
</storybook-multiple-selector> | ||
</storybook-wrapper> | ||
`; |
7 changes: 7 additions & 0 deletions
7
...r-cli/src/stories/basics/component-with-complex-selectors/attribute-selector.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'storybook-attribute-selector[foo]', | ||
template: '<p>Attribute selector</p>', | ||
}) | ||
export class AttributeSelectorComponent {} |
7 changes: 7 additions & 0 deletions
7
.../stories/basics/component-with-complex-selectors/attributewithvalue-selector.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'storybook-attribute-value-selector[foo=bar]', | ||
template: '<p>Attribute with value</p>', | ||
}) | ||
export class AttributeWithValueSelectorComponent {} |
28 changes: 28 additions & 0 deletions
28
...rc/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { MultipleSelectorComponent } from './multiple-selector.component'; | ||
import { AttributeSelectorComponent } from './attribute-selector.component'; | ||
import { AttributeWithValueSelectorComponent } from './attributewithvalue-selector.component'; | ||
|
||
export default { | ||
title: 'Basics / Component / With Complex Selectors', | ||
}; | ||
|
||
export const MultipleSelectors = () => ({}); | ||
|
||
MultipleSelectors.storyName = 'multiple selectors'; | ||
MultipleSelectors.parameters = { | ||
component: MultipleSelectorComponent, | ||
}; | ||
|
||
export const AttributeSelectors = () => ({}); | ||
|
||
AttributeSelectors.storyName = 'attribute selectors'; | ||
AttributeSelectors.parameters = { | ||
component: AttributeSelectorComponent, | ||
}; | ||
|
||
export const AttributeValueSelectors = () => ({}); | ||
|
||
AttributeValueSelectors.storyName = 'attribute value selectors'; | ||
AttributeValueSelectors.parameters = { | ||
component: AttributeWithValueSelectorComponent, | ||
}; |
7 changes: 7 additions & 0 deletions
7
...ar-cli/src/stories/basics/component-with-complex-selectors/multiple-selector.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'storybook-multiple-selector, storybook-multiple-selector2', | ||
template: '<p>Multiple selector</p>', | ||
}) | ||
export class MultipleSelectorComponent {} |