This file contains hidden or 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
import * as React from "react"; | |
import { PropertyControls, ControlType } from "framer"; |
This file contains hidden or 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
Show hidden characters
{ | |
"extends": "./node_modules/@polkadot/dev/config/tsconfig", | |
"compilerOptions": { | |
"allowJs": true, | |
"baseUrl": ".", | |
"typeRoots": ["./node_modules/@polkadot/ts", "./node_modules/@types"] | |
}, | |
"include": ["src/**/*"], | |
"exclude": ["node_modules", "**/*.spec.ts"] | |
} |
This file contains hidden or 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
{ | |
"extends": "@polkadot/dev/config/tslint", | |
"linterOptions": { | |
"exclude": "packages/**/src/**/*.json" | |
}, | |
"rules": { | |
"completed-docs": false | |
} | |
} |
This file contains hidden or 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
const style: React.CSSProperties = { | |
height: "100%", | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "center", | |
textAlign: "center", | |
color: "#8855FF", | |
background: "rgba(136, 85, 255, 0.1)", | |
overflow: "hidden" | |
}; |
This file contains hidden or 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
export class Frog extends React.Component<Props> { | |
// Return the component contents in JSX | |
// https://reactjs.org/docs/introducing-jsx.html | |
render() { | |
return <div style={style}>{this.props.text}</div>; | |
} | |
// Set default values for props if there are none | |
// https://reactjs.org/docs/react-component.html#defaultprops | |
static defaultProps: Props = { | |
text: "Hello World!" |
This file contains hidden or 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
// Set default values for props if there are none | |
// https://reactjs.org/docs/react-component.html#defaultprops | |
static defaultProps: Props = { | |
text: "Hello World!" | |
}; | |
// Add Framer UI for this component (in the properties panel) | |
// https://framer.com/learn/docs/components#code | |
static propertyControls: PropertyControls<Props> = { | |
text: { type: ControlType.String, title: "Text" } | |
}; |
This file contains hidden or 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
type Props = { text: string }; |
This file contains hidden or 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
import * as React from "react"; | |
import { PropertyControls, ControlType } from "framer"; |
This file contains hidden or 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
import * as React from "react"; | |
import { PropertyControls, ControlType } from "framer"; | |
// For the best editing experience in VSCode, install Prettier | |
// https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode | |
// Everything below is standard React. If you are new, start here: | |
// https://reactjs.org/docs/getting-started.html#learn-react | |
// https://reactjs.org/docs/components-and-props.html | |
// We can tell TypeScript to help us by defining our types | |
// https://www.typescriptlang.org/docs/handbook/basic-types.html | |
type Props = { text: string }; |
This file contains hidden or 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
pragma solidity ^0.4.23; | |
import '../node_modules/openzeppelin-solidity/contracts/token/ERC721/ERC721.sol'; | |
contract StarNotary is ERC721 { | |
struct Star { | |
string name; | |
uint256 id; | |
string story; |