Unverified Commit 7363af07 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

[DevOverlay] use buttons for interactive indicator row options (#74887)

Removes the need for custom CSS to style these and also enables keyboard
interactivity.
parent aa0a8195
......@@ -160,11 +160,12 @@ const IndicatorRow = ({
value: React.ReactNode
onClick?: () => void
}) => {
const Wrapper = onClick ? 'button' : 'div'
return (
<div data-nextjs-dev-tools-row data-clickable={!!onClick} onClick={onClick}>
<Wrapper data-nextjs-dev-tools-row onClick={onClick}>
<span data-nextjs-dev-tools-row-label>{label}</span>
<span data-nextjs-dev-tools-row-value>{value}</span>
</div>
</Wrapper>
)
}
......
......@@ -77,10 +77,6 @@ export const styles = css`
border-radius: var(--rounded-md);
}
[data-nextjs-dev-tools-row][data-clickable='true'] {
cursor: pointer;
}
[data-nextjs-dev-tools-row]:hover {
background-color: var(--color-gray-100);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment