Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rodleviton committed Nov 20, 2023
1 parent 90a35d5 commit ef2cc31
Show file tree
Hide file tree
Showing 27 changed files with 2,916 additions and 332 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,3 @@ Recast is a fundamentally different approach to building React components to max
Recast is not just a collection of utilities; it is an approach/pattern to building **truly** reusable component primitives by abstracting the theme layer from the internal workings of a component.

The specific values that an Recast "primitive" can receive are not specified within the component, instead these are defined by wrapping the component with a styles definition that will form the theme API.

## Features

### Tailwind friendly

Recast works seamlessly with CSS frameworks like Tailwind CSS, or use any flavour of css you like.

### TypeScript at its core

Recast is brought to you courtesy of TypeScript. Types are what make all this possible.

### Tiny

At only a 1.2 kb gzipped and zero dependencies, Recast packs a big punch for such a small utility library.

### No more prop bloat

Define your own component theme API. Include only the props you need and nothing more. Kitchen sink not included!
271 changes: 148 additions & 123 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": ["next", "prettier"]
}
3 changes: 3 additions & 0 deletions packages/docs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"proseWrap": "always"
}
7 changes: 7 additions & 0 deletions packages/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
/** @type {import('next').NextConfig} */

const { readFileSync } = require("fs");

const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.jsx",
mdxOptions: {
rehypePrettyCodeOptions: {
theme: JSON.parse(readFileSync("./public/syntax/editor.json", "utf8")),
},
},
});

module.exports = withNextra({
Expand Down
3 changes: 3 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"add": "^2.0.6",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.1",
"eslint-config-prettier": "^9.0.0",
"postcss": "^8",
"prettier": "^3.1.0",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
Expand Down
Loading

0 comments on commit ef2cc31

Please sign in to comment.