-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0522743
commit 0782d19
Showing
8 changed files
with
288 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Outlet } from '@remix-run/react' | ||
import SidebarLayout from '~/ui/sidebar-layout' | ||
|
||
export default function Component() { | ||
return ( | ||
<div className="relative isolate flex grow flex-col"> | ||
<SidebarLayout> | ||
<SidebarLayout.Nav> | ||
<SidebarLayout.NavTitle>Docs</SidebarLayout.NavTitle> | ||
<SidebarLayout.NavLink to={'/docs/create-form-action'}> | ||
createFormAction | ||
</SidebarLayout.NavLink> | ||
</SidebarLayout.Nav> | ||
<SidebarLayout.Content> | ||
<div className="flex flex-col space-y-4 p-4 text-gray-200 sm:space-y-8 sm:p-8"> | ||
<div className="prose lg:prose-xl"> | ||
<Outlet /> | ||
</div> | ||
</div> | ||
</SidebarLayout.Content> | ||
</SidebarLayout> | ||
</div> | ||
) | ||
} |
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,29 @@ | ||
--- | ||
meta: | ||
title: createFormAction | ||
description: createFormAction | ||
--- | ||
|
||
# createFormAction | ||
|
||
## heading 2 | ||
|
||
### heading 3 | ||
|
||
#### heading 4 | ||
|
||
You can reference your frontmatter data through "attributes". The title of this post is {attributes.meta.title}! | ||
|
||
Create a new file named index.js | ||
|
||
```js | ||
import { createFormAction } from 'remix-forms' | ||
// For Remix, import it like this | ||
import { redirect, json } from '@remix-run/node' | ||
// For React Router 6.4, like this | ||
import { redirect, json } from 'react-router-dom' | ||
|
||
const formAction = createFormAction({ redirect, json }) | ||
|
||
export { formAction } | ||
``` |
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,3 @@ | ||
import { redirect } from '@remix-run/node' | ||
|
||
export const loader = () => redirect('/docs/create-form-action') |
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 |
---|---|---|
@@ -1,7 +1,26 @@ | ||
module.exports = { | ||
content: ['./app/**/*.{js,ts,jsx,tsx}'], | ||
theme: { | ||
extend: {}, | ||
extend: { | ||
typography: ({ theme }) => ({ | ||
DEFAULT: { | ||
css: { | ||
color: theme('colors.white'), | ||
h1: { | ||
color: theme('colors.pink[500]'), | ||
fontWeight: 'bold', | ||
}, | ||
'h2, h3, h4, h5, h6': { | ||
color: theme('colors.white') | ||
} | ||
}, | ||
}, | ||
}), | ||
}, | ||
}, | ||
plugins: [require('@tailwindcss/forms'), require('tailwind-scrollbar')], | ||
plugins: [ | ||
require('@tailwindcss/forms'), | ||
require('tailwind-scrollbar'), | ||
require('@tailwindcss/typography'), | ||
], | ||
} |
Oops, something went wrong.