|
1 | 1 | # react-net-templates |
2 | | -Shared React Components used in react-templates.net project templates |
| 2 | + |
| 3 | +Shared React Tailwind Components for [react-templates.net](https://react-templates.net) project templates. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +```bash |
| 8 | +npm install react-net-templates |
| 9 | +``` |
| 10 | + |
| 11 | +## Usage |
| 12 | + |
| 13 | +Import components and styles in your React application: |
| 14 | + |
| 15 | +```tsx |
| 16 | +import { GettingStarted, ShellCommand, AutoUis } from 'react-net-templates' |
| 17 | +import 'react-net-templates/styles.css' |
| 18 | +``` |
| 19 | + |
| 20 | +## Components |
| 21 | + |
| 22 | +### GettingStarted |
| 23 | + |
| 24 | +A complete project creation widget with template download and CLI instructions. |
| 25 | + |
| 26 | +```tsx |
| 27 | +import { GettingStarted, ReactLogo } from 'react-net-templates' |
| 28 | + |
| 29 | +<GettingStarted |
| 30 | + template="react-spa" |
| 31 | + templateName="React SPA" |
| 32 | + runLabel="Run .NET and React" |
| 33 | + logo={<ReactLogo className="size-12" />} |
| 34 | +/> |
| 35 | +``` |
| 36 | + |
| 37 | +### ShellCommand |
| 38 | + |
| 39 | +A styled shell command display with copy-to-clipboard functionality. |
| 40 | + |
| 41 | +```tsx |
| 42 | +import { ShellCommand } from 'react-net-templates' |
| 43 | + |
| 44 | +<ShellCommand>npm install react-net-templates</ShellCommand> |
| 45 | +``` |
| 46 | + |
| 47 | +### AutoUis |
| 48 | + |
| 49 | +An image carousel showcasing ServiceStack's built-in Auto UIs including API Explorer, Locode, Admin UI, and more. |
| 50 | + |
| 51 | +```tsx |
| 52 | +import { AutoUis } from 'react-net-templates' |
| 53 | + |
| 54 | +<AutoUis className="my-8" /> |
| 55 | +``` |
| 56 | + |
| 57 | +### Logo Components |
| 58 | + |
| 59 | +SVG logo components for common technologies: |
| 60 | + |
| 61 | +- `NextLogo` - Next.js logo |
| 62 | +- `ReactLogo` - React logo |
| 63 | +- `TypeScriptLogo` - TypeScript logo |
| 64 | +- `TailwindLogo` - Tailwind CSS logo |
| 65 | +- `ViteLogo` - Vite logo |
| 66 | +- `ServiceStackLogo` - ServiceStack logo |
| 67 | + |
| 68 | +```tsx |
| 69 | +import { ReactLogo, TailwindLogo, TypeScriptLogo } from 'react-net-templates' |
| 70 | + |
| 71 | +<ReactLogo className="size-12 text-blue-500" /> |
| 72 | +<TailwindLogo className="size-12" /> |
| 73 | +<TypeScriptLogo className="size-12" /> |
| 74 | +``` |
| 75 | + |
| 76 | +## Development |
| 77 | + |
| 78 | +```bash |
| 79 | +# Install dependencies |
| 80 | +npm install |
| 81 | + |
| 82 | +# Run development server with demo |
| 83 | +npm run dev |
| 84 | + |
| 85 | +# Build the library |
| 86 | +npm run build |
| 87 | + |
| 88 | +# Run tests |
| 89 | +npm test |
| 90 | + |
| 91 | +# Type check |
| 92 | +npm run type-check |
| 93 | +``` |
| 94 | + |
| 95 | +## Peer Dependencies |
| 96 | + |
| 97 | +- React 18.x or 19.x |
| 98 | +- React DOM 18.x or 19.x |
| 99 | + |
| 100 | +## License |
| 101 | + |
| 102 | +BSD-3-Clause |
0 commit comments