Skip to content

Commit 8dfc09f

Browse files
committed
lint
1 parent c0b51a6 commit 8dfc09f

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

packages/storybook/src/stories/avatar.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default meta;
1414
export const BasicExample = meta.story({
1515
args: {},
1616
render: (args) => (
17-
<div style={{ width: "200px"}}>
17+
<div style={{ width: "200px" }}>
1818
<ScoutAvatar {...args} />
1919
</div>
2020
),
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Component, type ComponentInterface, getAssetPath, h, Prop } from "@stencil/core";
1+
import {
2+
Component,
3+
type ComponentInterface,
4+
getAssetPath,
5+
h,
6+
Prop,
7+
} from "@stencil/core";
28

39
/**
410
* The avatar component is used to display the user's profile picture.
@@ -10,39 +16,36 @@ import { Component, type ComponentInterface, getAssetPath, h, Prop } from "@sten
1016
shadow: {
1117
delegatesFocus: true,
1218
},
13-
assetsDirs: ['assets'],
19+
assetsDirs: ["assets"],
1420
})
1521

16-
/**
17-
*
18-
*/
22+
/**
23+
*
24+
*/
1925
export class ScoutAvatar implements ComponentInterface {
20-
2126
/**
2227
* The source URL of the user image.
2328
*/
24-
@Prop() imageSrc = '';
29+
@Prop() imageSrc = "";
2530

2631
/**
2732
* The name of the user.
2833
*/
29-
@Prop() alt = '';
34+
@Prop() alt = "";
3035

3136
render() {
3237
const getImagePath = () => {
3338
if (this.imageSrc) {
3439
return this.imageSrc;
3540
}
3641
try {
37-
return getAssetPath('assets/fallbackImage.png');
38-
} catch (error) {
42+
return getAssetPath("assets/fallbackImage.png");
43+
} catch (_e) {
3944
console.info("In storybook, rendering from storybook asset");
40-
return 'fallbackImage.png';
45+
return "fallbackImage.png";
4146
}
4247
};
4348

44-
return (
45-
<img src={getImagePath()} alt={this.alt} />
46-
);
49+
return <img src={getImagePath()} alt={this.alt} />;
4750
}
4851
}

packages/ui-webc/src/components/avatar/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Wrap it with a container, to determine its size, since it scales to fit containe
1212

1313
| Property | Attribute | Description | Type | Default |
1414
| ---------- | ----------- | --------------------------------- | -------- | ------- |
15-
| `alt` | `alt` | The name of the user. | `string` | `''` |
16-
| `imageSrc` | `image-src` | The source URL of the user image. | `string` | `''` |
15+
| `alt` | `alt` | The name of the user. | `string` | `""` |
16+
| `imageSrc` | `image-src` | The source URL of the user image. | `string` | `""` |
1717

1818

1919
----------------------------------------------

0 commit comments

Comments
 (0)