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 {
|
.close {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: 2px solid transparent;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -72,6 +72,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-radius: $input-corner;
|
||||||
|
border: 2px solid $blue;
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
fill: $grey-50;
|
fill: $grey-50;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import React, { PropsWithChildren } from 'react'
|
import React, { PropsWithChildren } from 'react'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
|
||||||
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
import * as DialogPrimitive from '@radix-ui/react-dialog'
|
||||||
|
|
||||||
import CrossIcon from '~public/icons/Cross.svg'
|
import CrossIcon from '~public/icons/Cross.svg'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
|
|
||||||
|
|
@ -31,7 +33,7 @@ export const DialogHeader = React.forwardRef<HTMLDivElement, Props>(
|
||||||
{subtitle && <div className={styles.subtitle}>{subtitle}</div>}
|
{subtitle && <div className={styles.subtitle}>{subtitle}</div>}
|
||||||
<div className={styles.title}>{title}</div>
|
<div className={styles.title}>{title}</div>
|
||||||
</div>
|
</div>
|
||||||
<DialogPrimitive.Close className={styles.close}>
|
<DialogPrimitive.Close className={styles.close} tabIndex={0}>
|
||||||
<CrossIcon />
|
<CrossIcon />
|
||||||
</DialogPrimitive.Close>
|
</DialogPrimitive.Close>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue