m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-10 06:03:50 -05:00

3 Commits

Author SHA1 Message Date
Sergio
98dafb8ba4 chore: bump project version 2025-03-10 16:49:07 +02:00
Sergio
2addfca1b4 fix: code block component copying was working incorrectly (#62) 2025-03-10 16:47:47 +02:00
dependabot[bot]
e3b05923ae Bump ring from 0.17.11 to 0.17.13 (#60)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.11 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 19:26:28 +02:00
3 changed files with 7 additions and 5 deletions

6
Cargo.lock generated
View File

@@ -355,7 +355,7 @@ dependencies = [
[[package]] [[package]]
name = "cup" name = "cup"
version = "3.0.3" version = "3.0.4"
dependencies = [ dependencies = [
"bollard", "bollard",
"chrono", "chrono",
@@ -1505,9 +1505,9 @@ dependencies = [
[[package]] [[package]]
name = "ring" name = "ring"
version = "0.17.11" version = "0.17.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee"
dependencies = [ dependencies = [
"cc", "cc",
"cfg-if", "cfg-if",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "cup" name = "cup"
version = "3.0.3" version = "3.0.4"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View File

@@ -21,6 +21,8 @@ export function CodeBlock({
}; };
}; };
const copyText = children instanceof Array ? children.join("") : children;
return ( return (
<div <div
className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`} className={`group relative flex w-full items-center rounded-lg bg-${theme}-100 px-3 py-2 font-mono text-${theme}-700 dark:bg-${theme}-950 dark:text-${theme}-300`}
@@ -35,7 +37,7 @@ export function CodeBlock({
) : ( ) : (
<button <button
className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`} className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
onClick={handleCopy(`docker pull ${children}`)} onClick={handleCopy(`${copyText}`)}
> >
<Clipboard className="size-5" /> <Clipboard className="size-5" />
</button> </button>