diff --git a/package.json b/package.json index 7e7607c..05c4ccb 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@payloadcms/next": "^3.35.1", "@payloadcms/richtext-lexical": "^3.35.1", "@tailwindcss/postcss": "^4.1.4", + "clsx": "^2.1.1", "graphql": "^16.10.0", "next": "15.3.1", "payload": "^3.35.1", @@ -22,6 +23,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "sharp": "^0.34.1", + "tailwind-merge": "^3.2.0", "tailwindcss": "^4.1.4" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e46421..5f11bd0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@tailwindcss/postcss': specifier: ^4.1.4 version: 4.1.4 + clsx: + specifier: ^2.1.1 + version: 2.1.1 graphql: specifier: ^16.10.0 version: 16.10.0 @@ -44,6 +47,9 @@ importers: sharp: specifier: ^0.34.1 version: 0.34.1 + tailwind-merge: + specifier: ^3.2.0 + version: 3.2.0 tailwindcss: specifier: ^4.1.4 version: 4.1.4 @@ -3207,6 +3213,9 @@ packages: tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + tailwind-merge@3.2.0: + resolution: {integrity: sha512-FQT/OVqCD+7edmmJpsgCsY820RTD5AkBryuG5IUqR5YQZSdj5xlH5nLgH7YPths7WsLPSpSBNneJdM8aS8aeFA==} + tailwindcss@4.1.4: resolution: {integrity: sha512-1ZIUqtPITFbv/DxRmDr5/agPqJwF69d24m9qmM1939TJehgY539CtzeZRjbLt5G6fSy/7YqqYsfvoTEw9xUI2A==} @@ -6908,6 +6917,8 @@ snapshots: tabbable@6.2.0: {} + tailwind-merge@3.2.0: {} + tailwindcss@4.1.4: {} tapable@2.2.1: {} diff --git a/src/app/(website)/brand/page.tsx b/src/app/(website)/brand/page.tsx index b1c0e82..ee1738c 100644 --- a/src/app/(website)/brand/page.tsx +++ b/src/app/(website)/brand/page.tsx @@ -1,6 +1,18 @@ +import Button from "../components/Button"; + +const BUTTON_TYPES: Parameters[0]["type"][] = [ + "primary", + "secondary", + "alternate", +] as const; +const BUTTON_VARIANTS: Parameters[0]["variant"][] = [ + "filled", + "outlined", +]; + export default function Page() { return ( -
+

iNZight Analytics Brand

@@ -8,10 +20,21 @@ export default function Page() {

Colours

-
-
+
+
-
+
+
+
+ {BUTTON_VARIANTS.map((variant) => ( +
+ {BUTTON_TYPES.map((type) => ( + + ))} +
+ ))}
diff --git a/src/app/(website)/components/Button/index.tsx b/src/app/(website)/components/Button/index.tsx new file mode 100644 index 0000000..366f10f --- /dev/null +++ b/src/app/(website)/components/Button/index.tsx @@ -0,0 +1,41 @@ +import cn from "../../utils/cn"; + +export default function Button({ + children, + type, + variant, + className, + ...props +}: { + children: React.ReactNode; + type: "primary" | "secondary" | "alternate"; + variant?: "filled" | "outlined"; + className?: string; + // [x: string]: +}) { + const btnVariant = variant ?? "filled"; + return ( + + ); +} diff --git a/src/app/(website)/globals.css b/src/app/(website)/globals.css index b456bec..2b956ef 100644 --- a/src/app/(website)/globals.css +++ b/src/app/(website)/globals.css @@ -6,4 +6,29 @@ /* FONT FAMILIES */ --font-sans: Inter, sans; --font-display: var(--font-sans); + + /* COLOURS */ + --color-accent-50: #fff1f2; + --color-accent-100: #ffe1e3; + --color-accent-200: #ffc8cc; + --color-accent-300: #ffa1a8; + --color-accent-400: #fe6b76; + --color-accent-500: #f73c49; + --color-accent-600: #e52331; + --color-accent-700: #c01521; + --color-accent-800: #9f151f; + --color-accent-900: #841820; + --color-accent-950: #48070c; + + --color-secondary-50: #f5f8f5; + --color-secondary-100: #e8f0e9; + --color-secondary-200: #d2e0d3; + --color-secondary-300: #aec7af; + --color-secondary-400: #82a684; + --color-secondary-500: #5f8862; + --color-secondary-600: #4b6e4d; + --color-secondary-700: #415d43; + --color-secondary-800: #344735; + --color-secondary-900: #2c3b2d; + --color-secondary-950: #141f16; } diff --git a/src/app/(website)/utils/cn.ts b/src/app/(website)/utils/cn.ts new file mode 100644 index 0000000..babb550 --- /dev/null +++ b/src/app/(website)/utils/cn.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx"; +import { twMerge } from "tailwind-merge"; + +export default function cn(...args: ClassValue[]) { + return twMerge(clsx(args)); +}