From 42d18441b7639d009985ffada584335d5bdc58eb 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 + 2 files changed, 5 insertions(+) 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; /** * Чтобы закргуление было равно половине высоты.