File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel/modals/Modal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 display : flex ;
88 align-items : center ;
99 justify-content : center ;
10- opacity : 0 ;
1110 padding-bottom : 30px ;
1211
1312 & ::before {
2019 background-color : var (--vscode-sideBar-background );
2120 opacity : 0.7 ;
2221 }
23-
24- & --visible {
25- opacity : 1 ;
26- transition : all var (--transition-duration-250 )
27- var (--transition-timing-function );
28-
29- .container {
30- transform : scale (1 );
31- transition : transform var (--transition-duration-250 )
32- var (--transition-timing-function );
33- }
34- }
3522}
3623
3724.container {
4229 border : 1px solid var (--vscode-sideBarSectionHeader-border );
4330 width : 100% ;
4431 margin : var (--padding-24px );
45- transform : scale (0.9 );
4632 max-width : 320px ;
4733}
Original file line number Diff line number Diff line change 1- import { useEffect , useState } from 'react'
21import styles from './Modal.module.scss'
3- import cn from 'classnames'
42
53type Props = {
64 children : React . ReactNode
75}
86
97export const Modal : React . FC < Props > = ( props ) => {
10- const [ is_hydrated , set_is_hydrated ] = useState ( false ) // For entry animation
11-
12- useEffect ( ( ) => {
13- set_is_hydrated ( true )
14- } , [ ] )
15-
168 return (
17- < div
18- className = { cn ( styles . overlay , {
19- [ styles [ 'overlay--visible' ] ] : is_hydrated
20- } ) }
21- >
9+ < div className = { styles . overlay } >
2210 < div className = { styles . container } > { props . children } </ div >
2311 </ div >
2412 )
You can’t perform that action at this time.
0 commit comments