move to biome (#297)
* switch to biome * writer format * migrate format * packages format * hudozka format * writer fix * biome config updated * migrate fix * packages fix * hudozka fix * claude updated
This commit is contained in:
1 parent
98dcaaa237
commit
467a218d00
112 files changed
+1472
-5914
No files matched your search
@@ -17,10 +17,7 @@ export function Transition(props: TransitionProps) {
|
||||
setMounted(false)
|
||||
}
|
||||
}, [opacity])
|
||||
const transition = useMemo(
|
||||
() => `all ${props.duration}ms`,
|
||||
[props.duration],
|
||||
)
|
||||
const transition = useMemo(() => `all ${props.duration}ms`, [props.duration])
|
||||
|
||||
if (props.show && !mounted) {
|
||||
setMounted(true)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import s from "./styles.module.css"
|
||||
|
||||
import { Transition } from "./Transition"
|
||||
import { useLockBodyScroll, useReducedMotion } from "@hudozka/hooks"
|
||||
import s from "./styles.module.css"
|
||||
import { Transition } from "./Transition"
|
||||
|
||||
export type OverlayProps = {
|
||||
children?: React.ReactNode
|
||||
@@ -18,16 +17,18 @@ export const Overlay: React.FC<OverlayProps> = props => {
|
||||
useLockBodyScroll(props.show)
|
||||
|
||||
return (
|
||||
<Transition
|
||||
duration={duration}
|
||||
show={props.show}
|
||||
>
|
||||
<Transition duration={duration} show={props.show}>
|
||||
<div
|
||||
onClick={(event) => {
|
||||
onClick={event => {
|
||||
if (event.target === event.currentTarget) {
|
||||
props.onClickOverlay()
|
||||
}
|
||||
}}
|
||||
onKeyDown={event => {
|
||||
if (event.key === "Escape") {
|
||||
props.onClickOverlay()
|
||||
}
|
||||
}}
|
||||
className={s.overlay}
|
||||
style={props.style}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user