Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
2f752eb5
Commit
2f752eb5
authored
Dec 20, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed linting errors
parent
f74b3d22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
.eslintrc
libs/remix-ui/toaster/.eslintrc
+1
-1
index.ts
libs/remix-ui/toaster/src/index.ts
+1
-1
toaster.tsx
libs/remix-ui/toaster/src/lib/toaster.tsx
+11
-12
No files found.
libs/remix-ui/toaster/.eslintrc
View file @
2f752eb5
...
...
@@ -3,7 +3,7 @@
"browser": true,
"es6": true
},
"extends": "../../.eslintrc",
"extends": "../../.
./.
eslintrc",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
...
...
libs/remix-ui/toaster/src/index.ts
View file @
2f752eb5
export
*
from
'./lib/toaster'
;
export
*
from
'./lib/toaster'
libs/remix-ui/toaster/src/lib/toaster.tsx
View file @
2f752eb5
import
React
,
{
useEffect
,
useState
}
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
// eslint-disable-line
import
'./toaster.css'
;
import
'./toaster.css'
/* eslint-disable-next-line */
export
interface
ToasterProps
{
...
...
@@ -32,7 +32,7 @@ export const Toaster = (props: ToasterProps) => {
}
})
},
opts
.
time
)
}
}
setState
(
prevState
=>
{
return
{
...
...
@@ -45,7 +45,7 @@ export const Toaster = (props: ToasterProps) => {
},
[
props
.
message
])
const
shortTooltipText
=
state
.
message
.
length
>
201
?
state
.
message
.
substring
(
0
,
200
)
+
'...'
:
state
.
message
function
hide
()
{
if
(
state
.
timeOutId
)
clearTimeout
(
state
.
timeOutId
)
}
...
...
@@ -55,7 +55,7 @@ export const Toaster = (props: ToasterProps) => {
}
function
closeTheToaster
()
{
hide
()
hide
()
}
// out()
...
...
@@ -63,21 +63,20 @@ export const Toaster = (props: ToasterProps) => {
// const hide = state.timeOutId
const
className
=
`remixui_tooltip alert alert-info p-2
${
animate
}
`
return
(
<
div
data
-
shared=
"tooltipPopup"
className=
{
className
}
onMouseEnter=
{
()
=>
{
}
}
onMouseLeave=
{
()
=>
{
}
}
>
<
div
data
-
shared=
"tooltipPopup"
className=
{
className
}
onMouseEnter=
{
()
=>
{
}
}
onMouseLeave=
{
()
=>
{
}
}
>
<
span
className=
"px-2"
>
{
shortTooltipText
}
{
state
.
message
.
length
>
201
?
<
button
className=
"btn btn-secondary btn-sm mx-3"
style=
{
{
whiteSpace
:
'nowrap'
}
}
onClick=
{
()
=>
showFullMessage
()
}
>
Show full message
</
button
>
:
''
}
{
state
.
message
.
length
>
201
?
<
button
className=
"btn btn-secondary btn-sm mx-3"
style=
{
{
whiteSpace
:
'nowrap'
}
}
onClick=
{
()
=>
showFullMessage
()
}
>
Show full message
</
button
>
:
''
}
</
span
>
<
span
style=
{
{
alignSelf
:
'baseline'
}
}
>
<
span
style=
{
{
alignSelf
:
'baseline'
}
}
>
<
button
data
-
id=
"tooltipCloseButton"
className=
"fas fa-times btn-info mx-1 p-0"
onClick=
{
()
=>
closeTheToaster
()
}
></
button
>
</
span
>
</
div
>
)
// animation(this.tooltip, css.animateBottom.className)
};
// animation(this.tooltip, css.animateBottom.className)
}
export
default
Toaster
;
export
default
Toaster
const
defaultOptions
=
(
opts
)
:
ToasterOptions
=>
{
opts
=
opts
||
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment