-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactor test body using GravityUI
- Loading branch information
1 parent
951b1cd
commit e71515c
Showing
61 changed files
with
252 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
import React, {Component} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Portal } from '@gravity-ui/uikit'; | ||
import './modal.css'; | ||
|
||
export default class Modal extends Component { | ||
componentWillMount() { | ||
this._root = document.createElement('div'); | ||
document.body.classList.add('modal-open'); | ||
document.body.appendChild(this._root); | ||
} | ||
|
||
componentWillUnmount() { | ||
document.body.classList.remove('modal-open'); | ||
document.body.removeChild(this._root); | ||
} | ||
|
||
render() { | ||
const {className} = this.props; | ||
const {className, children} = this.props; | ||
|
||
return ReactDOM.createPortal( | ||
<div className={className}> | ||
{this.props.children} | ||
</div>, | ||
this._root | ||
); | ||
return ( | ||
<Portal> | ||
<div className={className}> | ||
{children} | ||
</div> | ||
</Portal> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
.history { | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
|
||
.history-item { | ||
display: inline-flex; | ||
padding-right: 8px; | ||
padding-top: 1px; | ||
padding-bottom: 1px; | ||
|
||
gap: 4px; | ||
|
||
.history-item__time { | ||
opacity: 0.5; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.