Skip to content

Commit cccc780

Browse files
committed
Add click to copy note
1 parent 39940ba commit cccc780

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/components/color-palette.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export function ColorPalette() {
5555
</div>
5656
</React.Fragment>
5757
))}
58+
59+
<div className="pt-2 text-center text-gray-500 italic max-sm:hidden sm:col-span-2 md:col-span-1 md:col-start-2 dark:text-gray-400">
60+
Click to copy the OKLCH value or shift+click to copy the nearest hex value.
61+
</div>
5862
</div>
5963
);
6064
}

src/docs/colors.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ import { Example } from "@/components/example";
22
import { Figure } from "@/components/figure";
33
import { ColorPalette } from "../components/color-palette.tsx";
44
import { Stripes } from "@/components/stripes.tsx";
5+
import { TipGood, TipBad, TipCompat, TipInfo } from "@/components/tips";
56

67
export const title = "Colors";
78
export const description = "Using and customizing the color palette in Tailwind CSS projects.";
89

910
Tailwind CSS includes a vast, beautiful color palette out of the box, carefully crafted by expert designers and suitable for a wide range of different design styles.
1011

1112
<div className="my-10">
13+
{/* <TipInfo>{<>Click to copy OKLCH, shift+click to copy nearest hex</>}</TipInfo> */}
14+
{/* <div className="mt-6"> */}
1215
<ColorPalette />
16+
{/* </div> */}
1317
</div>
1418

1519
Every color in the default palette includes 11 steps, with 50 being the lightest, and 950 being the darkest:

0 commit comments

Comments
 (0)