File tree Expand file tree Collapse file tree 5 files changed +36
-3
lines changed Expand file tree Collapse file tree 5 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 11name : " Deploy to VPS"
22
33on :
4- release :
5- types : [published]
4+ push :
5+ branches :
6+ [main]
67
78jobs :
89 build-and-deploy :
Original file line number Diff line number Diff line change @@ -7,18 +7,21 @@ const archivoBlack = Archivo_Black({
77 subsets : [ "latin" ] ,
88 weight : "400" ,
99 variable : "--font-head" ,
10+ display : "swap" ,
1011} ) ;
1112
1213const shareTech = Share_Tech ( {
1314 subsets : [ "latin" ] ,
1415 weight : "400" ,
1516 variable : "--font-sans" ,
17+ display : "swap" ,
1618} ) ;
1719
1820const shareTechMono = Share_Tech_Mono ( {
1921 subsets : [ "latin" ] ,
2022 weight : "400" ,
2123 variable : "--font-mono" ,
24+ display : "swap" ,
2225} ) ;
2326
2427export const metadata : Metadata = {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const components = {
2929 } : React . HTMLAttributes < HTMLElement > ) => (
3030 < code
3131 className = { cn (
32- "relative rounded bg-[#282A36] py-1 px-2 text-primary-500 text-sm" ,
32+ "relative rounded bg-[#282A36] p-1 text-primary-500 text-sm" ,
3333 className
3434 ) }
3535 { ...props }
Original file line number Diff line number Diff line change 11import { INavigationConfig } from "@/types" ;
22
33const componentsRoute = "/docs/components" ;
4+ const utilsRoute = "/docs/utils" ;
45
56export const navConfig : INavigationConfig = {
67 topNavItems : [
@@ -26,5 +27,9 @@ export const navConfig: INavigationConfig = {
2627 { title : "Typography" , href : `${ componentsRoute } /typography` } ,
2728 ] ,
2829 } ,
30+ {
31+ title : "Utilities" ,
32+ children : [ { title : "cn" , href : `${ utilsRoute } /cn` } ] ,
33+ } ,
2934 ] ,
3035} ;
Original file line number Diff line number Diff line change 1+ ---
2+ title : cn
3+ description : A utilily function that saves you from style conflicts.
4+ lastUpdated : 17 Oct, 2024
5+ ---
6+
7+ The ` cn ` utility function combines ` clsx ` and ` tw-merge ` .
8+ This enables you to construct className strings conditionally without having to worry about Tailwind CSS style conflicts.
9+
10+ <br />
11+ <br />
12+
13+ ## Installation
14+
15+ #### 1. Copy the code 👇 into your ` lib/utils.ts ` file:
16+
17+ ``` ts
18+ import clsx from " clsx" ;
19+ import { ClassNameValue , twMerge } from " tailwind-merge" ;
20+
21+ export function cn(... classes : ClassNameValue []) {
22+ return twMerge (clsx (classes ));
23+ }
24+ ```
You can’t perform that action at this time.
0 commit comments