-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8847e8
commit 3f55893
Showing
8 changed files
with
128 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Meta, StoryObj } from '@storybook/html'; | ||
import type { Components } from '../../components.js'; | ||
|
||
const meta = { | ||
title: 'Design System/Atoms/AppDetails', | ||
render: args => `<d-app-details version="${args.version}"></d-app-details>`, | ||
} satisfies Meta<Components.DAppDetails>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<Components.DAppDetails>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
version: "1.0.9", | ||
} | ||
}; |
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,3 @@ | ||
:host { | ||
display: block; | ||
} |
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,22 @@ | ||
import { Component, Host, Prop, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'd-app-details', | ||
styleUrl: 'd-app-details.css', | ||
shadow: true, | ||
}) | ||
export class DAppDetails { | ||
@Prop() version: string; | ||
@Prop() developedBy: string = 'Develepoded by Forkbomb BV'; | ||
|
||
render() { | ||
return ( | ||
<Host> | ||
<div class="flex flex-col items-center gap-2 p-6"> | ||
<d-text size="l">{this.developedBy}</d-text> | ||
<d-text size="m">v {this.version}</d-text> | ||
</div> | ||
</Host> | ||
); | ||
} | ||
} |
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,31 @@ | ||
# d-app-details | ||
|
||
|
||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
||
## Properties | ||
|
||
| Property | Attribute | Description | Type | Default | | ||
| ------------- | -------------- | ----------- | -------- | ------------------------------ | | ||
| `developedBy` | `developed-by` | | `string` | `'Develepoded by Forkbomb BV'` | | ||
| `version` | `version` | | `string` | `undefined` | | ||
|
||
|
||
## Dependencies | ||
|
||
### Depends on | ||
|
||
- [d-text](../text) | ||
|
||
### Graph | ||
```mermaid | ||
graph TD; | ||
d-app-details --> d-text | ||
style d-app-details fill:#f9f,stroke:#333,stroke-width:4px | ||
``` | ||
|
||
---------------------------------------------- | ||
|
||
*Built with [StencilJS](https://stenciljs.com/)* |
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,11 @@ | ||
import { newE2EPage } from '@stencil/core/testing'; | ||
|
||
describe('d-app-details', () => { | ||
it('renders', async () => { | ||
const page = await newE2EPage(); | ||
await page.setContent('<d-app-details></d-app-details>'); | ||
|
||
const element = await page.find('d-app-details'); | ||
expect(element).toHaveClass('hydrated'); | ||
}); | ||
}); |
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,25 @@ | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
import { DAppDetails } from '../d-app-details'; | ||
|
||
describe('d-app-details', () => { | ||
it('renders', async () => { | ||
const page = await newSpecPage({ | ||
components: [DAppDetails], | ||
html: `<d-app-details></d-app-details>`, | ||
}); | ||
expect(page.root).toEqualHtml(` | ||
<d-app-details> | ||
<mock:shadow-root> | ||
<div class="flex flex-col gap-2 items-center p-6"> | ||
<d-text size="l"> | ||
Develepoded by Forkbomb BV | ||
</d-text> | ||
<d-text size="m"> | ||
v | ||
</d-text> | ||
</div> | ||
</mock:shadow-root> | ||
</d-app-details> | ||
`); | ||
}); | ||
}); |
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