Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
master: initial commit - init node package & add litelement
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorjdawson committed Jan 16, 2020
1 parent d394e84 commit c595236
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "embeddable_nfts",
"version": "0.0.1",
"description": "Resuable, embeddable webcomponent for OpenSea assets.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ProjectOpenSea/embeddable_nfts.git"
},
"author": "Taylor Dawson",
"license": "ISC",
"bugs": {
"url": "https://github.com/ProjectOpenSea/embeddable_nfts/issues"
},
"homepage": "https://github.com/ProjectOpenSea/embeddable_nfts#readme",
"dependencies": {
"lit-element": "^2.2.1"
}
}
32 changes: 32 additions & 0 deletions src/nft-card.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Import LitElement base class, html helper function,
* and TypeScript decorators
**/
import {
LitElement, html, customElement, property
} from 'lit-element';

/**
* Use the customElement decorator to define your class as
* a custom element. Registers <my-element> as an HTML tag.
*/
@customElement('my-element')
export class MyElement extends LitElement {

/**
* Create an observed property. Triggers update on change.
*/
@property()
foo = 'foo';

/**
* Implement `render` to define a template for your element.
*/
render(){
/**
* Use JavaScript expressions to include property values in
* the element template.
*/
return html`<p>${this.foo}</p>`;
}
}

0 comments on commit c595236

Please sign in to comment.