@courtneyring/components-library 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/components/Button/Button.d.ts +12 -0
- package/dist/components/Button/Button.js +15 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +18 -0
- package/package.json +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/pages/api-reference/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
[API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
|
|
22
|
+
|
|
23
|
+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) instead of React pages.
|
|
24
|
+
|
|
25
|
+
This project uses [`next/font`](https://nextjs.org/docs/pages/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
26
|
+
|
|
27
|
+
## Learn More
|
|
28
|
+
|
|
29
|
+
To learn more about Next.js, take a look at the following resources:
|
|
30
|
+
|
|
31
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
32
|
+
- [Learn Next.js](https://nextjs.org/learn-pages-router) - an interactive Next.js tutorial.
|
|
33
|
+
|
|
34
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
35
|
+
|
|
36
|
+
## Deploy on Vercel
|
|
37
|
+
|
|
38
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
39
|
+
|
|
40
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/pages/building-your-application/deploying) for more details.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default Button;
|
|
2
|
+
declare function Button({ children, fn, href, target, hollow, variation, textDecoration, label, value, }: {
|
|
3
|
+
children: any;
|
|
4
|
+
fn: any;
|
|
5
|
+
href: any;
|
|
6
|
+
target: any;
|
|
7
|
+
hollow?: boolean | undefined;
|
|
8
|
+
variation?: string | undefined;
|
|
9
|
+
textDecoration: any;
|
|
10
|
+
label: any;
|
|
11
|
+
value: any;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
var link_1 = __importDefault(require("next/link"));
|
|
9
|
+
var Button_module_scss_1 = __importDefault(require("./Button.module.scss"));
|
|
10
|
+
var Button = function (_a) {
|
|
11
|
+
var children = _a.children, fn = _a.fn, href = _a.href, target = _a.target, _b = _a.hollow, hollow = _b === void 0 ? false : _b, _c = _a.variation, variation = _c === void 0 ? "primary" : _c, textDecoration = _a.textDecoration, label = _a.label, value = _a.value;
|
|
12
|
+
var Tag = href || value ? link_1.default : "button";
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(Tag, { href: href || value, onClick: fn && fn, target: target, className: "".concat(Button_module_scss_1.default.button, " ").concat(hollow ? Button_module_scss_1.default.hollow : Button_module_scss_1.default.filled, " ").concat(Button_module_scss_1.default[variation]), style: { textDecoration: textDecoration }, children: children || label }));
|
|
14
|
+
};
|
|
15
|
+
exports.default = Button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/Button/Button";
|
package/dist/exports.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./components/Button/Button"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@courtneyring/components-library",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "./dist/exports.js",
|
|
5
|
+
"files": [
|
|
6
|
+
"./dist"
|
|
7
|
+
],
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/exports.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"next:dev": "next dev",
|
|
13
|
+
"next:build": "next build",
|
|
14
|
+
"next:start": "next start",
|
|
15
|
+
"storybook": "storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "storybook build",
|
|
17
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json"
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"next": "15.5.3",
|
|
22
|
+
"react": "19.1.0",
|
|
23
|
+
"react-dom": "19.1.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@storybook/nextjs": "^9.1.7",
|
|
27
|
+
"sass": "^1.93.1",
|
|
28
|
+
"storybook": "^9.1.7"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"next": "15.5.3",
|
|
32
|
+
"react": "19.1.0",
|
|
33
|
+
"react-dom": "19.1.0"
|
|
34
|
+
}
|
|
35
|
+
}
|