Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
fastn built-in functions fixes (#352)
Browse files Browse the repository at this point in the history
* fastn built-in functions fixes

* minor fix

* yet another minor fix
  • Loading branch information
Heulitig authored Sep 1, 2023
1 parent 34f3596 commit b0c60d9
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions ftd/built-in-functions.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,8 @@ copy content in clipboard.

-- ds.rendered.input:

\-- void copy-me-call(text): ;; <hl>
string text: ;; <hl>
\;; <hl>
ftd.copy_to_clipboard(text) ;; <hl>

\-- ftd.text: Click to Copy ⭐️
$on-click$: $copy-me-call(text = ⭐) ;; <hl>
$on-click$: $ftd.copy-to-clipboard(a = ⭐) ;; <hl>
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
Expand Down Expand Up @@ -779,13 +774,7 @@ string list $a:
string v:
integer num:

ftd.insert_at(a, v, num);


-- void copy-me-call(text):
string text:

ftd.copy_to_clipboard(text)
ftd.insert_at(a, num, v);


-- void set-dark():
Expand Down Expand Up @@ -1151,16 +1140,14 @@ $on-click$: $ftd.enable-system-mode()





-- component copy-clipboard-sample:

-- ftd.text: Click to Copy ⭐️
$on-click$: $copy-me-call(text = ⭐)
color: $inherited.colors.text
border-color: $red-yellow
border-width.px: 2
padding.px: 10
$on-click$: $ftd.copy-to-clipboard(a = ⭐)

-- end: copy-clipboard-sample

Expand Down

0 comments on commit b0c60d9

Please sign in to comment.