diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html
index 0fecfc6..8ccd966 100644
--- a/.storybook/preview-head.html
+++ b/.storybook/preview-head.html
@@ -1,3 +1,8 @@
+
diff --git a/src/components.d.ts b/src/components.d.ts
index 295363b..298f1cd 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -5,8 +5,8 @@
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
-import { Shape, Size } from "./components/types";
-export { Shape, Size } from "./components/types";
+import { Color, Shape, Size } from "./components/types";
+export { Color, Shape, Size } from "./components/types";
export namespace Components {
interface DAvatar {
"name"?: string;
@@ -14,6 +14,11 @@ export namespace Components {
"size"?: Size;
"src"?: string;
}
+ interface DButton {
+ "color"?: Color;
+ "disabled"?: boolean;
+ "href"?: string;
+ }
interface DCredentialCard {
"description"?: string;
"expirationDate"?: string;
@@ -37,6 +42,12 @@ declare global {
prototype: HTMLDAvatarElement;
new (): HTMLDAvatarElement;
};
+ interface HTMLDButtonElement extends Components.DButton, HTMLStencilElement {
+ }
+ var HTMLDButtonElement: {
+ prototype: HTMLDButtonElement;
+ new (): HTMLDButtonElement;
+ };
interface HTMLDCredentialCardElement extends Components.DCredentialCard, HTMLStencilElement {
}
var HTMLDCredentialCardElement: {
@@ -51,6 +62,7 @@ declare global {
};
interface HTMLElementTagNameMap {
"d-avatar": HTMLDAvatarElement;
+ "d-button": HTMLDButtonElement;
"d-credential-card": HTMLDCredentialCardElement;
"d-credential-service": HTMLDCredentialServiceElement;
}
@@ -62,6 +74,11 @@ declare namespace LocalJSX {
"size"?: Size;
"src"?: string;
}
+ interface DButton {
+ "color"?: Color;
+ "disabled"?: boolean;
+ "href"?: string;
+ }
interface DCredentialCard {
"description"?: string;
"expirationDate"?: string;
@@ -79,6 +96,7 @@ declare namespace LocalJSX {
}
interface IntrinsicElements {
"d-avatar": DAvatar;
+ "d-button": DButton;
"d-credential-card": DCredentialCard;
"d-credential-service": DCredentialService;
}
@@ -88,6 +106,7 @@ declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"d-avatar": LocalJSX.DAvatar & JSXBase.HTMLAttributes;
+ "d-button": LocalJSX.DButton & JSXBase.HTMLAttributes;
"d-credential-card": LocalJSX.DCredentialCard & JSXBase.HTMLAttributes;
"d-credential-service": LocalJSX.DCredentialService & JSXBase.HTMLAttributes;
}
diff --git a/src/components/avatar/avatar.stories.ts b/src/components/avatar/avatar.stories.ts
index 8208a9b..83cab53 100644
--- a/src/components/avatar/avatar.stories.ts
+++ b/src/components/avatar/avatar.stories.ts
@@ -23,7 +23,7 @@ export const Rounded: Story = {
parameters: {
design: {
type: 'figma',
- url: 'https://www.figma.com/file/Klm6pxIZSaJFiOMX5FpTul9F/@storybook/addon-designs-sample',
+ url: 'https://www.figma.com/file/pdwfO3dMKtaCAQakht0JE6/DIDRoom-%2B-Signroom---WF-and-GUI---Dyne.org?type=design&node-id=2005-930&mode=dev',
},
},
};
diff --git a/src/components/avatar/avatar.tsx b/src/components/avatar/avatar.tsx
index 24f7ca4..3a21405 100644
--- a/src/components/avatar/avatar.tsx
+++ b/src/components/avatar/avatar.tsx
@@ -7,10 +7,11 @@ import { Shape, Size } from '../types';
shadow: true,
})
export class Avatar {
+ @Prop() name?: string;
+ @Prop() size?: Size = 'm';
+ @Prop() shape?: Shape = 'round';
@Prop({ reflect: true }) src?: string;
- @Prop({ reflect: true }) name?: string;
- @Prop({ reflect: true }) size?: Size = 'm';
- @Prop({ reflect: true }) shape?: Shape = 'round';
+
@State() error: boolean = false;
render() {
diff --git a/src/components/avatar/test/avatar.spec.tsx b/src/components/avatar/test/avatar.spec.tsx
index c28ec04..88fb50d 100644
--- a/src/components/avatar/test/avatar.spec.tsx
+++ b/src/components/avatar/test/avatar.spec.tsx
@@ -8,7 +8,7 @@ describe('d-avatar', () => {
html: ``,
});
expect(page.root).toEqualHtml(`
-
+