From fdab21d7eb0f357a9163158973750ab9c8ec1c0b Mon Sep 17 00:00:00 2001 From: Daniil Suvorov Date: Wed, 24 Jan 2024 13:06:40 +0300 Subject: [PATCH] fix(IconButton): add fit-content (#6440) - Fixes #6057 --- .../src/components/IconButton/IconButton.e2e-playground.tsx | 4 ++++ packages/vkui/src/components/IconButton/IconButton.module.css | 1 + .../iconbutton-android-chromium-dark-1-snap.png | 4 ++-- .../iconbutton-android-chromium-light-1-snap.png | 4 ++-- .../__image_snapshots__/iconbutton-ios-webkit-dark-1-snap.png | 4 ++-- .../iconbutton-ios-webkit-light-1-snap.png | 4 ++-- .../iconbutton-vkcom-chromium-dark-1-snap.png | 4 ++-- .../iconbutton-vkcom-chromium-light-1-snap.png | 4 ++-- .../iconbutton-vkcom-firefox-dark-1-snap.png | 4 ++-- .../iconbutton-vkcom-firefox-light-1-snap.png | 4 ++-- .../iconbutton-vkcom-webkit-dark-1-snap.png | 4 ++-- .../iconbutton-vkcom-webkit-light-1-snap.png | 4 ++-- 12 files changed, 25 insertions(+), 20 deletions(-) diff --git a/packages/vkui/src/components/IconButton/IconButton.e2e-playground.tsx b/packages/vkui/src/components/IconButton/IconButton.e2e-playground.tsx index 1ea8a6e915..d852da2549 100644 --- a/packages/vkui/src/components/IconButton/IconButton.e2e-playground.tsx +++ b/packages/vkui/src/components/IconButton/IconButton.e2e-playground.tsx @@ -22,6 +22,10 @@ export const IconButtonPlayground = (props: ComponentPlaygroundProps) => { ], $adaptivity: 'y', }, + { + children: [], + href: ['https://vk.ru'], + }, ]} > {(props: IconButtonProps) => ( diff --git a/packages/vkui/src/components/IconButton/IconButton.module.css b/packages/vkui/src/components/IconButton/IconButton.module.css index 1e43135bca..9c95c31d14 100644 --- a/packages/vkui/src/components/IconButton/IconButton.module.css +++ b/packages/vkui/src/components/IconButton/IconButton.module.css @@ -9,6 +9,7 @@ margin: 0; position: relative; block-size: 48px; + inline-size: fit-content; /** * Чтобы закргуление было равно половине высоты. diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-dark-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-dark-1-snap.png index 975188f49b..84f62d55a4 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-dark-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79cfc205267b35c1177d33ffbcea1d1b666cdf15d252289509c47266d37a8ea0 -size 36493 +oid sha256:e44e897396c3c65e99243c965bea152415c4bf509580fc7a512286db69e2d385 +size 41483 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-light-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-light-1-snap.png index 789f95dd33..0855e1df75 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-light-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-android-chromium-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5709dd8631762e6392dcf32e1db443452597fe8e618465c022d0a6103b1c89c -size 37108 +oid sha256:0c50dfdad74c70d04dce87e8580f4cd34204db0da9fa4f1b69f85a3c0f7edef0 +size 42234 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-dark-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-dark-1-snap.png index 22dd0f94b0..f747e9c84c 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-dark-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a7069c06b55f458306f1136d60a48ad5a49e4997721701fb74940751ae795aa -size 29973 +oid sha256:2e1b2cd408be1ff21529bd7789223070be9254177a0c907c7ec1832eceef3ce2 +size 34083 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-light-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-light-1-snap.png index 68c495fd69..baec23aa29 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-light-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-ios-webkit-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fff75e37e426b7ab85b5121e09f64aebf6c59a1b73b93a2a1cf0cff1c9ff6bd3 -size 30483 +oid sha256:e808df925c5c88582466e6a25ca896f99832ede2312c3722443ed18a30201168 +size 34668 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-dark-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-dark-1-snap.png index 7705b660ce..477acc4c17 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-dark-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:687e91f22612fe06a9537739161d542e24f471fb23fb490df11cad4a26bdbc39 -size 6324 +oid sha256:6361bcc94ded6821691c3b1cebd643fce09dbdb59be238e0a53c7dac74bce0bd +size 17988 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-light-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-light-1-snap.png index 1efeca5d86..d24e06cca9 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-light-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-chromium-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c721fa904e30ef8b813d5256bd92471c8641d4037f9d707e513530e57c5347a -size 6482 +oid sha256:2c030ad3b5e209a98e1288c4a62502cf20f986a9dbdd7c0b138c30645155e9d9 +size 18317 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-dark-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-dark-1-snap.png index d3fe0c71f2..2a15f3d979 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-dark-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a4091d86e169fe4f3c47227dd5a84e69f20cad1708385695720ebdc4a49e1af -size 6109 +oid sha256:dab74e04bccec6ccdb73e6727e13deea578efd3adcae333fa6a92a3c653ce446 +size 17176 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-light-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-light-1-snap.png index eb609889fa..574bd6b426 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-light-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-firefox-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8462d1b72c88acb36e8cbcfece8eb38650edbc27d40ce129f2f5ab4a9b22a2c7 -size 6265 +oid sha256:3264711b40f9cf305c085cfcb417101017b9ec499689423d953399b22fdb95b7 +size 17574 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-dark-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-dark-1-snap.png index cdcd3c5c83..996f65d053 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-dark-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-dark-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:425f76c01ec7fbc89525b8657b3cb4f114000dfa78b60a9f178faa6724437052 -size 5743 +oid sha256:2b23cd0b0653cc9f6f6b9ddaee8666d0548714719daea9a573023a611e430ff0 +size 16116 diff --git a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-light-1-snap.png b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-light-1-snap.png index 84673ff3b7..a12e03f2a4 100644 --- a/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-light-1-snap.png +++ b/packages/vkui/src/components/IconButton/__image_snapshots__/iconbutton-vkcom-webkit-light-1-snap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c9db393e020359e1b107edd2fd6ae296b8f4208910f1b7ebe011b53f597e470 -size 5815 +oid sha256:09794bcf5884fcc30873a99c4b352025e86d467dce5a55b24e78bfdd84d1e26c +size 16419