From c5b437a0339190df8f19f40de4eda139bbfa2def Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Fri, 24 Jul 2020 17:48:25 +0800 Subject: [PATCH] style(popover-item): the whole item should be clickable when using with link (#345) --- components/popover/popover-item.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/popover/popover-item.tsx b/components/popover/popover-item.tsx index 21c5c5d..ba13aac 100644 --- a/components/popover/popover-item.tsx +++ b/components/popover/popover-item.tsx @@ -39,7 +39,6 @@ const PopoverItem: React.FC> = ({ line-height: 1.25rem; text-align: left; transition: color 0.1s ease 0s, background-color 0.1s ease 0s; - width: max-content; } .item:hover { @@ -50,6 +49,12 @@ const PopoverItem: React.FC> = ({ margin: 0; } + .item > :global(.link) { + width: 100%; + padding: 0.5rem ${theme.layout.gap}; + margin: -0.5rem -${theme.layout.gap}; + } + .item.line { line-height: 0; height: 0;