@linktr.ee/create-link-app 1.7.11 → 1.7.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.11",
2
+ "version": "1.7.13",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "1.7.11",
3
+ "version": "1.7.13",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",
@@ -1,4 +1,6 @@
1
1
  {
2
2
  "__linkUrl": "https://linktr.ee/linkapp",
3
- "__layout": "STACK"
3
+ "__layout": "FEATURED",
4
+ "linkBehavior": "embedLabel",
5
+ "url": "https://example.com"
4
6
  }
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "title": "Link App",
3
+ "has_url": false,
3
4
  "elements": [
4
5
  {
5
- "id": "thumbnailUrl",
6
- "title": "Thumbnail",
7
- "inputType": "file",
8
- "accept": ["image/*"]
9
- },
10
- {
11
- "id": "title",
12
- "title": "Title",
13
- "inputType": "text"
6
+ "id": "url",
7
+ "inputType": "text",
8
+ "label": "URL",
9
+ "defaultValue": "https://example.com"
14
10
  },
15
11
  {
16
- "id": "url",
17
- "title": "URL",
18
- "inputType": "text"
12
+ "id": "linkBehavior",
13
+ "inputType": "linkBehavior",
14
+ "label": "How would you like this link to act?",
15
+ "defaultValue": "embedLabel",
16
+ "linkBehaviorLabels": {
17
+ "embedLabel": "Display link app's UI",
18
+ "linkOffLabel": "Go directly to URL"
19
+ }
19
20
  }
20
21
  ]
21
22
  }
@@ -5,7 +5,6 @@
5
5
  "login": "create-link-app login",
6
6
  "logout": "create-link-app logout",
7
7
  "upload": "create-link-app deploy",
8
- "update": "create-link-app deploy --update",
9
8
  "storybook": "create-link-app storybook",
10
9
  "dev": "create-link-app dev",
11
10
  "prepack": "create-link-app build --native"
@@ -5,7 +5,6 @@
5
5
  "login": "create-link-app login",
6
6
  "logout": "create-link-app logout",
7
7
  "upload": "create-link-app deploy",
8
- "update": "create-link-app deploy --update",
9
8
  "storybook": "create-link-app storybook",
10
9
  "dev": "create-link-app dev",
11
10
  "prepack": "create-link-app build --native"
@@ -1,23 +1,20 @@
1
- import { Featured, Carousel, Grid, Stack } from './components/Layouts'
2
- import { AppProps } from './types'
1
+ import { AppProps } from "./types";
3
2
 
4
- import './tailwind.css'
3
+ import "./tailwind.css";
5
4
 
6
5
  function App(props: AppProps) {
7
- const { __layout } = props
8
-
9
- switch (__layout) {
10
- case 'STACK':
11
- return <Stack {...props} />
12
- case 'GRID':
13
- return <Grid {...props} />
14
- case 'CAROUSEL':
15
- return <Carousel {...props} />
16
- case 'FEATURED':
17
- return <Featured {...props} />
18
- default:
19
- return <div>Unknown layout: {__layout}</div>
20
- }
6
+ return (
7
+ <div className="px-6 pt-12 pb-11 h-full">
8
+ <h1>My first link app!</h1>
9
+ <p>Congratulations, you now have a Linktree link!</p>
10
+ <button
11
+ className="bg-black text-white py-2 px-4 rounded-full my-2"
12
+ onClick={() => window.open(props.url, "_blank")}
13
+ >
14
+ Visit your URL
15
+ </button>
16
+ </div>
17
+ );
21
18
  }
22
19
 
23
- export default App
20
+ export default App;
@@ -12,4 +12,6 @@ type LinktreeLinkAppContext = {
12
12
 
13
13
  export type AppProps = LinktreeLinkAppContext & {
14
14
  // Additional properties here
15
+ linkBehavior: 'embedLabel' | 'linkOffLabel'
16
+ url: string
15
17
  }