-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/tough-cookie-4.1.3
- Loading branch information
Showing
284 changed files
with
14,646 additions
and
13,148 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
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
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
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
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
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
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,6 @@ | ||
{ | ||
"extends": ["../.eslintrc.json"], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
documentation/docs/api/Components/LinkWithStatePassthrough.mdx
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,44 @@ | ||
--- | ||
id: "LinkWithStatePassthrough" | ||
title: "LinkWithStatePassthrough" | ||
sidebar_label: "LinkWithStatePassthrough" | ||
sidebar_position: 3 | ||
--- | ||
|
||
```ts | ||
import { LinkWithStatePassthrough } from '@orfium/toolbox'; | ||
``` | ||
|
||
:::info | ||
Must be a descendant of [`Router`](https://v5.reactrouter.com/web/api/Router). | ||
::: | ||
|
||
## Description | ||
|
||
A utility component that wraps over React Router's [`Link`](https://v5.reactrouter.com/web/api/Link) component, | ||
but takes care to pass the _current_ history state over to the next link location. | ||
|
||
**Example usage** | ||
|
||
```tsx | ||
// `to` value can be a full or partial location object | ||
// (do note that explicitly passing a `state` object here will be ignored) | ||
function EmptyPage() { | ||
return ( | ||
<LinkWithStatePassthrough to={{ pathname: '/login' }} /> | ||
); | ||
} | ||
``` | ||
|
||
```tsx | ||
// `to` value can also just be a string | ||
function EmptyPage() { | ||
return ( | ||
<LinkWithStatePassthrough to={'/login'} /> | ||
); | ||
} | ||
``` | ||
|
||
## Props | ||
|
||
Ƭ `LinkProps` |
45 changes: 45 additions & 0 deletions
45
documentation/docs/api/Components/NavLinkWithStatePassthrough.mdx
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,45 @@ | ||
--- | ||
id: "NavLinkWithStatePassthrough" | ||
title: "NavLinkWithStatePassthrough" | ||
sidebar_label: "NavLinkWithStatePassthrough" | ||
sidebar_position: 3 | ||
--- | ||
|
||
```ts | ||
import { NavLinkWithStatePassthrough } from '@orfium/toolbox'; | ||
``` | ||
|
||
:::info | ||
Must be a descendant of [`Router`](https://v5.reactrouter.com/web/api/Router). | ||
::: | ||
|
||
|
||
## Description | ||
|
||
A utility component that wraps over React Router's [`NavLink`](https://v5.reactrouter.com/web/api/NavLink) component, | ||
but takes care to pass the _current_ history state over to the next link location. | ||
|
||
**Example usage** | ||
|
||
```tsx | ||
// `to` value can be a full or partial location object | ||
// (do note that explicitly passing a `state` object here will be ignored) | ||
function EmptyPage() { | ||
return ( | ||
<NavLinkWithStatePassthrough to={{ pathname: '/login' }} /> | ||
); | ||
} | ||
``` | ||
|
||
```tsx | ||
// `to` value can also just be a string | ||
function EmptyPage() { | ||
return ( | ||
<NavLinkWithStatePassthrough to={'/login'} /> | ||
); | ||
} | ||
``` | ||
|
||
## Props | ||
|
||
Ƭ `NavLinkProps` |
Oops, something went wrong.