Give visual focus state to close button
This commit is contained in:
parent
619eff2ad7
commit
d57b0fed23
2 changed files with 9 additions and 2 deletions
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
.close {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border: 2px solid transparent;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
|
@ -72,6 +72,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-radius: $input-corner;
|
||||
border: 2px solid $blue;
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $grey-50;
|
||||
float: right;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import React, { PropsWithChildren } from 'react'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
||||
|
||||
import CrossIcon from '~public/icons/Cross.svg'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
|
|
@ -31,7 +33,7 @@ export const DialogHeader = React.forwardRef<HTMLDivElement, Props>(
|
|||
{subtitle && <div className={styles.subtitle}>{subtitle}</div>}
|
||||
<div className={styles.title}>{title}</div>
|
||||
</div>
|
||||
<DialogPrimitive.Close className={styles.close}>
|
||||
<DialogPrimitive.Close className={styles.close} tabIndex={0}>
|
||||
<CrossIcon />
|
||||
</DialogPrimitive.Close>
|
||||
</header>
|
||||
|
|
|
|||
Loading…
Reference in a new issue