-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Avatars] HTML stories + fix (#3039)
- Loading branch information
1 parent
1cdae08
commit 470fd58
Showing
9 changed files
with
252 additions
and
9 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
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
24 changes: 24 additions & 0 deletions
24
stories/documentation/users/avatars/html&css/basic.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,24 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarBasicStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Basic', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarBasicStory): string { | ||
return ` | ||
<div class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</div> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarBasicStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const Basic = Template.bind({}); | ||
Basic.args = {}; |
34 changes: 34 additions & 0 deletions
34
stories/documentation/users/avatars/html&css/display.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,34 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarDisplayStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Display', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarDisplayStory): string { | ||
return ` | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar"> | ||
<span class="avatar-picture" style="background-color: rgb(202, 92, 214)"> | ||
<span class="avatar-picture-initials">FM</span> | ||
</span> | ||
</span> | ||
<span class="avatar mod-placeholder"> | ||
<span class="avatar-picture"> | ||
<span class="avatar-picture-initials">JT</span> | ||
</span> | ||
</span> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarDisplayStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const Display = Template.bind({}); | ||
Display.args = {}; |
41 changes: 41 additions & 0 deletions
41
stories/documentation/users/avatars/html&css/group/basic.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,41 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarGroupBasicStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Group/Basic', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarGroupBasicStory): string { | ||
return ` | ||
<ul class="avatarWrapper"> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
</ul> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarGroupBasicStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const Basic = Template.bind({}); | ||
Basic.args = {}; |
47 changes: 47 additions & 0 deletions
47
stories/documentation/users/avatars/html&css/group/clickable.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,47 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarGroupClickableStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Group/Clickable', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarGroupClickableStory): string { | ||
return ` | ||
<ul class="avatarWrapper"> | ||
<li class="avatarWrapper-item"> | ||
<a href="#" class="avatarWrapper-item-action"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</a> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<a href="#" class="avatarWrapper-item-action"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</a> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<a href="#" class="avatarWrapper-item-action"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</a> | ||
</li> | ||
</ul> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarGroupClickableStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const Clickable = Template.bind({}); | ||
Clickable.args = {}; |
49 changes: 49 additions & 0 deletions
49
stories/documentation/users/avatars/html&css/group/more.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,49 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarGroupMoreStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Group/More', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarGroupMoreStory): string { | ||
return ` | ||
<ul class="avatarWrapper"> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
<li class="avatarWrapper-item"> | ||
<span class="avatar"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="u-mask">Finn Mertens</span> | ||
</li> | ||
<li role="presentation" class="avatarWrapper-item"> | ||
<button type="button" class="avatarWrapper-item-action"> | ||
<span class="avatarWrapper-item-action-more"> | ||
<span aria-hidden="true" data-content-before="+8"></span> | ||
<span class="u-mask">Voir les 8 utilisateurs supplémentaires</span> | ||
</span> | ||
</button> | ||
</li> | ||
</ul> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarGroupMoreStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const More = Template.bind({}); | ||
More.args = {}; |
42 changes: 42 additions & 0 deletions
42
stories/documentation/users/avatars/html&css/sizes.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,42 @@ | ||
import { Meta, StoryFn } from '@storybook/angular'; | ||
|
||
interface UserAvatarSizesStory {} | ||
|
||
export default { | ||
title: 'Documentation/Users/Avatar/HTML&CSS/Sizes', | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
function getTemplate(args: UserAvatarSizesStory): string { | ||
return ` | ||
<span class="avatar mod-XS"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-S"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-M"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-L"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-XL"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-XXL"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
<span class="avatar mod-XXXL"> | ||
<img alt="" class="avatar-picture" loading="lazy" src="https://cdn.lucca.fr/lucca-front/avatars/finn.png" /> | ||
</span> | ||
`; | ||
} | ||
|
||
const Template: StoryFn<UserAvatarSizesStory> = (args) => ({ | ||
props: args, | ||
template: getTemplate(args), | ||
}); | ||
|
||
export const Sizes = Template.bind({}); | ||
Sizes.args = {}; |