-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from openfort-xyz/link-methods
chore: adding link unlink methods
- Loading branch information
Showing
151 changed files
with
3,307 additions
and
1,615 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
Binary file added
BIN
+6.19 KB
examples/apps/auth-sample/.yarn/cache/@alloc-quick-lru-npm-5.2.0-eb83517088-bdc35758b5.zip
Binary file not shown.
Binary file removed
BIN
-9.33 KB
examples/apps/auth-sample/.yarn/cache/@babel-code-frame-npm-7.24.6-214509ff08-0904514ea7.zip
Binary file not shown.
Binary file added
BIN
+2.47 MB
examples/apps/auth-sample/.yarn/cache/@heroicons-react-npm-2.1.3-0721c624b8-2a72920fa3.zip
Binary file not shown.
Binary file added
BIN
+22.9 KB
.../apps/auth-sample/.yarn/cache/@jridgewell-gen-mapping-npm-0.3.5-d8b85ebeaf-ff7a1764eb.zip
Binary file not shown.
Binary file added
BIN
+17.5 KB
.../apps/auth-sample/.yarn/cache/@jridgewell-resolve-uri-npm-3.1.2-5bc4245992-83b85f72c5.zip
Binary file not shown.
Binary file added
BIN
+8.72 KB
...es/apps/auth-sample/.yarn/cache/@jridgewell-set-array-npm-1.2.1-2312928209-832e513a85.zip
Binary file not shown.
Binary file added
BIN
+14.7 KB
.../auth-sample/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.15-a055fb62cf-b881c7e503.zip
Binary file not shown.
Binary file added
BIN
+45.5 KB
...ps/auth-sample/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.25-c076fd2279-9d3c40d225.zip
Binary file not shown.
Binary file renamed
BIN
+66.6 KB
...rt-js-npm-0.7.5-f3d9c29070-4df42f180e.zip → ...rt-js-npm-0.7.6-760f7f5d84-5640fa70fb.zip
Binary file not shown.
Binary file added
BIN
+4.73 KB
...ples/apps/auth-sample/.yarn/cache/@radix-ui-primitive-npm-1.0.1-cbcafe0446-2b93e161d3.zip
Binary file not shown.
Binary file added
BIN
+12.2 KB
...ps/auth-sample/.yarn/cache/@radix-ui-react-collection-npm-1.0.3-e63f97f38b-acfbc9b0b2.zip
Binary file not shown.
Binary file added
BIN
+6.24 KB
.../auth-sample/.yarn/cache/@radix-ui-react-compose-refs-npm-1.0.1-02d1046f7d-2b9a613b6d.zip
Binary file not shown.
Binary file added
BIN
+12.4 KB
.../apps/auth-sample/.yarn/cache/@radix-ui-react-context-npm-1.0.1-c6d8414c9a-60e9b81d36.zip
Binary file not shown.
Binary file added
BIN
+25.9 KB
...-sample/.yarn/cache/@radix-ui-react-dismissable-layer-npm-1.0.5-fbc4b71169-e73cf4bd37.zip
Binary file not shown.
Binary file added
BIN
+6.68 KB
...s/apps/auth-sample/.yarn/cache/@radix-ui-react-portal-npm-1.0.4-e4c93f6e90-c4cf35e2f2.zip
Binary file not shown.
Binary file added
BIN
+14.8 KB
...apps/auth-sample/.yarn/cache/@radix-ui-react-presence-npm-1.0.1-2057bd46b4-ed2ff9faf9.zip
Binary file not shown.
Binary file added
BIN
+13.9 KB
...pps/auth-sample/.yarn/cache/@radix-ui-react-primitive-npm-1.0.3-1983a5adc0-9402bc2292.zip
Binary file not shown.
Binary file added
BIN
+11 KB
...les/apps/auth-sample/.yarn/cache/@radix-ui-react-slot-npm-1.0.2-b9078e9a0b-edf5edf435.zip
Binary file not shown.
Binary file added
BIN
+61.8 KB
...es/apps/auth-sample/.yarn/cache/@radix-ui-react-toast-npm-1.1.5-bbb0151433-6fe821ffae.zip
Binary file not shown.
Binary file added
BIN
+5.85 KB
...h-sample/.yarn/cache/@radix-ui-react-use-callback-ref-npm-1.0.1-e521cb00a3-b9fd39911c.zip
Binary file not shown.
Binary file added
BIN
+7.72 KB
...le/.yarn/cache/@radix-ui-react-use-controllable-state-npm-1.0.1-cbe6fcf1d7-dee2be1937.zip
Binary file not shown.
Binary file added
BIN
+5.9 KB
...sample/.yarn/cache/@radix-ui-react-use-escape-keydown-npm-1.0.3-2455d95aa3-c6ed0d9ce7.zip
Binary file not shown.
Binary file added
BIN
+5.43 KB
...-sample/.yarn/cache/@radix-ui-react-use-layout-effect-npm-1.0.1-fa00f2498d-bed9c7e8de.zip
Binary file not shown.
Binary file added
BIN
+7.04 KB
...th-sample/.yarn/cache/@radix-ui-react-visually-hidden-npm-1.0.3-16767f48b2-2e9d0c8253.zip
Binary file not shown.
Binary file added
BIN
+14.1 KB
examples/apps/auth-sample/.yarn/cache/@tailwindcss-forms-npm-0.5.7-67f8a9f248-406fe102a4.zip
Binary file not shown.
Binary file removed
BIN
-4.01 KB
examples/apps/auth-sample/.yarn/cache/@types-js-cookie-npm-3.0.6-c9126e5b48-272d551687.zip
Binary file not shown.
Binary file removed
BIN
-2.45 KB
examples/apps/auth-sample/.yarn/cache/@types-parse-json-npm-4.0.2-f87f65692e-5bf62eec37.zip
Binary file not shown.
Binary file removed
BIN
-18.9 KB
examples/apps/auth-sample/.yarn/cache/acorn-node-npm-1.8.2-b30b72c499-02e1564a1c.zip
Binary file not shown.
Binary file removed
BIN
-22.1 KB
examples/apps/auth-sample/.yarn/cache/acorn-walk-npm-7.2.0-5f8b515308-9252158a79.zip
Binary file not shown.
Binary file added
BIN
+13.8 KB
examples/apps/auth-sample/.yarn/cache/any-promise-npm-1.3.0-f34eeaa7e7-0ee8a9bdbe.zip
Binary file not shown.
Binary file removed
BIN
-5.44 KB
examples/apps/auth-sample/.yarn/cache/bytes-npm-3.1.2-28b8643004-e4bcd3948d.zip
Binary file not shown.
Binary file added
BIN
+4.24 KB
examples/apps/auth-sample/.yarn/cache/clsx-npm-1.2.1-77792dc182-30befca801.zip
Binary file not shown.
Binary file removed
BIN
-6.41 KB
examples/apps/auth-sample/.yarn/cache/color-npm-4.2.3-4a23227581-0579629c02.zip
Binary file not shown.
Binary file removed
BIN
-4.04 KB
examples/apps/auth-sample/.yarn/cache/color-string-npm-1.9.1-dc020e56be-c13fe7cff7.zip
Binary file not shown.
Binary file added
BIN
+29 KB
examples/apps/auth-sample/.yarn/cache/commander-npm-4.1.1-22a0fe921b-d7b9913ff9.zip
Binary file not shown.
Binary file removed
BIN
-43.3 KB
examples/apps/auth-sample/.yarn/cache/commander-npm-8.3.0-c0d18c66d5-0f82321821.zip
Binary file not shown.
Binary file removed
BIN
-7.93 KB
examples/apps/auth-sample/.yarn/cache/cookie-npm-0.4.2-7761894d5f-a00833c998.zip
Binary file not shown.
Binary file removed
BIN
-38.4 KB
examples/apps/auth-sample/.yarn/cache/cosmiconfig-npm-7.1.0-13a5090bcd-c53bf7befc.zip
Binary file not shown.
Binary file removed
BIN
-2.77 KB
examples/apps/auth-sample/.yarn/cache/css-color-names-npm-0.0.4-be9111e9bd-9c61063204.zip
Binary file not shown.
Binary file removed
BIN
-3.46 KB
examples/apps/auth-sample/.yarn/cache/css-unit-converter-npm-1.1.2-277ce2166c-0788803334.zip
Binary file not shown.
Binary file removed
BIN
-6.69 KB
examples/apps/auth-sample/.yarn/cache/defined-npm-1.0.1-7471d27847-b1a852300b.zip
Binary file not shown.
Binary file removed
BIN
-16.8 KB
examples/apps/auth-sample/.yarn/cache/detective-npm-5.2.1-6417517bd5-dc4601bbc6.zip
Binary file not shown.
Binary file removed
BIN
-4.17 KB
examples/apps/auth-sample/.yarn/cache/error-ex-npm-1.3.2-5654f80c0f-c1c2b8b65f.zip
Binary file not shown.
Binary file removed
BIN
-27.9 KB
examples/apps/auth-sample/.yarn/cache/fs-extra-npm-10.1.0-86573680ed-dc94ab3709.zip
Binary file not shown.
Binary file removed
BIN
-8.42 KB
examples/apps/auth-sample/.yarn/cache/hex-color-regex-npm-1.1.0-35ec780c11-44fa1b7a26.zip
Binary file not shown.
Binary file removed
BIN
-3.65 KB
examples/apps/auth-sample/.yarn/cache/hsl-regex-npm-1.0.0-49e975d55c-de9ee1bf39.zip
Binary file not shown.
Binary file removed
BIN
-3.71 KB
examples/apps/auth-sample/.yarn/cache/hsla-regex-npm-1.0.0-f9d795def9-9aa6eb9ff6.zip
Binary file not shown.
Binary file removed
BIN
-4.28 KB
examples/apps/auth-sample/.yarn/cache/html-tags-npm-3.3.1-c8f411791b-b4ef1d5a76.zip
Binary file not shown.
Binary file removed
BIN
-3.8 KB
examples/apps/auth-sample/.yarn/cache/is-arrayish-npm-0.2.1-23927dfb15-eef4417e3c.zip
Binary file not shown.
Binary file removed
BIN
-17.2 KB
examples/apps/auth-sample/.yarn/cache/is-arrayish-npm-0.3.2-f856180f79-977e64f54d.zip
Binary file not shown.
Binary file removed
BIN
-7.98 KB
examples/apps/auth-sample/.yarn/cache/is-color-stop-npm-1.1.0-4235280dc5-778dd52a60.zip
Binary file not shown.
Binary file added
BIN
+398 KB
examples/apps/auth-sample/.yarn/cache/jiti-npm-1.21.0-baebd5985a-a7bd5d6392.zip
Binary file not shown.
Binary file removed
BIN
-11.5 KB
examples/apps/auth-sample/.yarn/cache/js-cookie-npm-3.0.5-8fc8fcc9b4-2dbd2809c6.zip
Binary file not shown.
Binary file removed
BIN
-5.71 KB
...auth-sample/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip
Binary file not shown.
Binary file removed
BIN
-6.91 KB
examples/apps/auth-sample/.yarn/cache/jsonfile-npm-6.1.0-20a4796cee-7af3b8e1ac.zip
Binary file not shown.
Binary file added
BIN
+6.17 KB
examples/apps/auth-sample/.yarn/cache/lilconfig-npm-3.1.1-b8cdeef996-dc8a4f4afd.zip
Binary file not shown.
Binary file removed
BIN
-603 KB
examples/apps/auth-sample/.yarn/cache/lodash-npm-4.17.21-6382451519-eb835a2e51.zip
Binary file not shown.
Binary file removed
BIN
-8.05 KB
examples/apps/auth-sample/.yarn/cache/lodash.topath-npm-4.5.2-d5c9ec2440-04583e220f.zip
Binary file not shown.
Binary file added
BIN
+6.33 KB
examples/apps/auth-sample/.yarn/cache/mini-svg-data-uri-npm-1.4.4-929f6f1119-997f1fbd8d.zip
Binary file not shown.
Binary file removed
BIN
-4.82 KB
examples/apps/auth-sample/.yarn/cache/modern-normalize-npm-1.1.0-8b51a7106b-edfd40650b.zip
Binary file not shown.
Binary file added
BIN
+5.78 KB
examples/apps/auth-sample/.yarn/cache/mz-npm-2.7.0-ec3cef4ec2-8427de0ece.zip
Binary file not shown.
Binary file removed
BIN
-55.8 KB
examples/apps/auth-sample/.yarn/cache/node-emoji-npm-1.11.0-dd2f09050c-e8c856c04a.zip
Binary file not shown.
Binary file removed
BIN
-9.81 KB
examples/apps/auth-sample/.yarn/cache/nookies-npm-2.5.2-691fdd44ab-4cc6fd8d0a.zip
Binary file not shown.
Binary file removed
BIN
-19.2 KB
examples/apps/auth-sample/.yarn/cache/object-hash-npm-2.2.0-d97a921cc1-55ba841e3a.zip
Binary file not shown.
Binary file added
BIN
+19.2 KB
examples/apps/auth-sample/.yarn/cache/object-hash-npm-3.0.0-d941e0cabe-80b4904bb3.zip
Binary file not shown.
Binary file removed
BIN
-3.34 KB
examples/apps/auth-sample/.yarn/cache/parse-json-npm-5.2.0-00a63b1199-62085b17d6.zip
Binary file not shown.
Binary file added
BIN
+3.38 KB
examples/apps/auth-sample/.yarn/cache/pify-npm-2.3.0-8b63310934-9503aaeaf4.zip
Binary file not shown.
Binary file added
BIN
+6.25 KB
examples/apps/auth-sample/.yarn/cache/pirates-npm-4.0.6-a8ec571a43-46a65fefaf.zip
Binary file not shown.
Binary file added
BIN
+12.2 KB
examples/apps/auth-sample/.yarn/cache/postcss-import-npm-15.1.0-8b9e86f900-7bd04bd8f0.zip
Binary file not shown.
Binary file removed
BIN
-6.71 KB
examples/apps/auth-sample/.yarn/cache/postcss-js-npm-3.0.3-ebe9aed0fc-cc17f59f2b.zip
Binary file not shown.
Binary file added
BIN
+5.25 KB
examples/apps/auth-sample/.yarn/cache/postcss-js-npm-4.0.1-2c4ee70bf3-5c1e83efea.zip
Binary file not shown.
Binary file removed
BIN
-9.14 KB
...ples/apps/auth-sample/.yarn/cache/postcss-load-config-npm-3.1.4-1cb8a7e276-1c589504c2.zip
Binary file not shown.
Binary file added
BIN
+8.98 KB
...ples/apps/auth-sample/.yarn/cache/postcss-load-config-npm-4.0.2-319bcff9ca-7c27dd3801.zip
Binary file not shown.
Binary file removed
BIN
-5.17 KB
examples/apps/auth-sample/.yarn/cache/postcss-nested-npm-5.0.6-d408d3cd6e-dbcbfd11e5.zip
Binary file not shown.
Binary file added
BIN
+5.82 KB
examples/apps/auth-sample/.yarn/cache/postcss-nested-npm-6.0.1-5cdc427fe8-7ddb0364cd.zip
Binary file not shown.
Binary file removed
BIN
-8.06 KB
...les/apps/auth-sample/.yarn/cache/postcss-value-parser-npm-3.3.1-24ecbb1b05-62cd26e1cd.zip
Binary file not shown.
Binary file removed
BIN
-4.18 KB
examples/apps/auth-sample/.yarn/cache/pretty-hrtime-npm-1.0.3-32fd75fcbd-bae0e6832f.zip
Binary file not shown.
Binary file removed
BIN
-18.8 KB
examples/apps/auth-sample/.yarn/cache/purgecss-npm-4.1.3-9099a5bb50-508613f904.zip
Binary file not shown.
Binary file removed
BIN
-4.67 KB
examples/apps/auth-sample/.yarn/cache/quick-lru-npm-5.1.1-e38e0edce3-a516faa255.zip
Binary file not shown.
Binary file added
BIN
+2.64 KB
examples/apps/auth-sample/.yarn/cache/read-cache-npm-1.0.0-00fa89ed05-cffc728b9e.zip
Binary file not shown.
Binary file removed
BIN
-38.6 KB
examples/apps/auth-sample/.yarn/cache/reduce-css-calc-npm-2.1.8-e2acd211e5-8fd27c06c4.zip
Binary file not shown.
Binary file removed
BIN
-3.65 KB
examples/apps/auth-sample/.yarn/cache/rgb-regex-npm-1.0.1-c867413fad-b270ce8bc1.zip
Binary file not shown.
Binary file removed
BIN
-3.72 KB
examples/apps/auth-sample/.yarn/cache/rgba-regex-npm-1.0.0-7fe6ce6060-7f2cd27157.zip
Binary file not shown.
Binary file removed
BIN
-6.89 KB
examples/apps/auth-sample/.yarn/cache/set-cookie-parser-npm-2.6.0-a7dd154236-bf11ebc594.zip
Binary file not shown.
Binary file removed
BIN
-2.62 KB
examples/apps/auth-sample/.yarn/cache/simple-swizzle-npm-0.2.2-8dee37fad1-a7f3f2ab5c.zip
Binary file not shown.
Binary file added
BIN
+309 KB
examples/apps/auth-sample/.yarn/cache/sucrase-npm-3.35.0-60ad876a0c-9fc5792a9a.zip
Binary file not shown.
Binary file removed
BIN
-3.24 MB
examples/apps/auth-sample/.yarn/cache/tailwindcss-npm-2.2.19-2800aee4e5-660e8086fa.zip
Binary file not shown.
Binary file added
BIN
+922 KB
examples/apps/auth-sample/.yarn/cache/tailwindcss-npm-3.4.3-deb88ca0a1-7d181a6aaf.zip
Binary file not shown.
Binary file added
BIN
+3.36 KB
examples/apps/auth-sample/.yarn/cache/thenify-all-npm-1.6.0-96309bbc8b-dba7cc8a23.zip
Binary file not shown.
Binary file added
BIN
+3.93 KB
examples/apps/auth-sample/.yarn/cache/thenify-npm-3.3.1-030bedb22c-84e1b804bf.zip
Binary file not shown.
Binary file removed
BIN
-15.4 KB
examples/apps/auth-sample/.yarn/cache/tmp-npm-0.2.3-ac2a701365-73b5c96b6e.zip
Binary file not shown.
Binary file added
BIN
+19.7 KB
...es/apps/auth-sample/.yarn/cache/ts-interface-checker-npm-0.1.13-0c7b064494-20c29189c2.zip
Binary file not shown.
Binary file removed
BIN
-2.82 KB
examples/apps/auth-sample/.yarn/cache/universalify-npm-2.0.1-040ba5a21e-ecd8469fe0.zip
Binary file not shown.
Binary file removed
BIN
-3.68 KB
examples/apps/auth-sample/.yarn/cache/xtend-npm-4.0.2-7f2375736e-ac5dfa738b.zip
Binary file not shown.
Binary file removed
BIN
-120 KB
examples/apps/auth-sample/.yarn/cache/yaml-npm-1.10.2-0e780aebdf-ce4ada136e.zip
Binary file not shown.
Binary file added
BIN
+236 KB
examples/apps/auth-sample/.yarn/cache/yaml-npm-2.4.3-3f2d66fba4-cf466e40dc.zip
Binary file not shown.
Binary file not shown.
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
17 changes: 0 additions & 17 deletions
17
examples/apps/auth-sample/src/components/Authentication/GoogleSignInButton.tsx
This file was deleted.
Oops, something went wrong.
190 changes: 0 additions & 190 deletions
190
examples/apps/auth-sample/src/components/Authentication/LoginSignupForm.tsx
This file was deleted.
Oops, something went wrong.
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,106 @@ | ||
import { | ||
forwardRef, | ||
SVGProps, | ||
ButtonHTMLAttributes, | ||
AnchorHTMLAttributes, | ||
} from 'react'; | ||
import Link from 'next/link'; | ||
import clsx from 'clsx'; | ||
|
||
interface ArrowIconProps extends SVGProps<SVGSVGElement> {} | ||
|
||
function ArrowIcon(props: ArrowIconProps) { | ||
return ( | ||
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" {...props}> | ||
<path | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
d="m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9" | ||
/> | ||
</svg> | ||
); | ||
} | ||
|
||
const variantStyles = { | ||
primary: 'rounded-md bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700', | ||
primaryOrange: | ||
'rounded-md bg-orange-600 py-1 px-3 font-semibold text-white hover:bg-orange-500', | ||
secondary: | ||
'rounded-md bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400', | ||
filled: 'rounded-md bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700', | ||
outline: | ||
'rounded-md py-1 px-3 text-zinc-700 ring-1 ring-inset ring-zinc-900/10 hover:bg-zinc-900/2.5 hover:text-zinc-900', | ||
text: 'text-orange-600 hover:text-zinc-900', | ||
}; | ||
|
||
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
variant?: keyof typeof variantStyles; | ||
arrow?: 'left' | 'right'; | ||
htmlType?: React.ButtonHTMLAttributes<HTMLButtonElement>['type']; | ||
icon?: React.ReactNode; | ||
} | ||
|
||
interface LinkButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> { | ||
variant?: keyof typeof variantStyles; | ||
arrow?: 'left' | 'right'; | ||
} | ||
|
||
export const Button = forwardRef<HTMLButtonElement, ButtonProps>( | ||
function Button( | ||
{ | ||
variant = 'primary', | ||
icon, | ||
|
||
arrow, | ||
htmlType = 'button', | ||
className, | ||
...props | ||
}, | ||
ref | ||
) { | ||
className = clsx( | ||
'inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition', | ||
variantStyles[variant], | ||
className | ||
); | ||
const showIcon = icon; | ||
|
||
let arrowIcon = ( | ||
<ArrowIcon | ||
className={clsx( | ||
'mt-0.5 h-5 w-5', | ||
variant === 'text' && 'relative top-px', | ||
arrow === 'left' && '-ml-1 rotate-180', | ||
arrow === 'right' && '-mr-1' | ||
)} | ||
/> | ||
); | ||
|
||
return ( | ||
<button type={htmlType} ref={ref} className={className} {...props}> | ||
{props.children} | ||
{arrow === 'right' && arrowIcon} | ||
</button> | ||
); | ||
} | ||
); | ||
|
||
export const LinkButton = forwardRef<HTMLAnchorElement, LinkButtonProps>( | ||
function LinkButton( | ||
{variant = 'primary', arrow, className, href, ...props}, | ||
ref | ||
) { | ||
className = clsx( | ||
'inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition', | ||
variantStyles[variant], | ||
className | ||
); | ||
|
||
return ( | ||
<Link href={href || '#'} ref={ref} className={className} {...props}> | ||
{props.children} | ||
</Link> | ||
); | ||
} | ||
); |
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
Oops, something went wrong.