Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-server
Commits
fc06f6e2
Commit
fc06f6e2
authored
Sep 06, 2018
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Задача 12799] Добавил кнопку редактирования исправленного текста
parent
9bdb5a56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
index.jsx
cp/javascript/src/components/EditableText/index.jsx
+3
-2
style.css
cp/javascript/src/components/EditableText/style.css
+21
-1
No files found.
cp/javascript/src/components/EditableText/index.jsx
View file @
fc06f6e2
import
React
,
{
Component
}
from
'react'
;
import
FaCheckCircle
from
'react-icons/lib/fa/check-circle'
;
import
FaTimesCircle
from
'react-icons/lib/fa/times-circle'
;
import
FaEdit
from
'react-icons/lib/fa/edit'
;
import
'./style.css'
...
...
@@ -41,11 +42,11 @@ export default class EditableText extends Component {
}
return
(
<
span
onClick=
{
this
.
enableEditing
.
bind
(
this
)
}
>
{
this
.
text
}
</
span
>
<
span
>
{
this
.
text
}
<
FaEdit
className=
"text-editable-button"
onClick=
{
this
.
enableEditing
}
/>
</
span
>
);
}
enableEditing
()
{
enableEditing
=
()
=>
{
this
.
setState
({
isEditable
:
true
});
...
...
cp/javascript/src/components/EditableText/style.css
View file @
fc06f6e2
...
...
@@ -14,10 +14,29 @@
}
.text-editable-button
:hover
{
background-color
:
rgba
(
0
,
0
,
0
,
0.2
);
-webkit-animation
:
pulse
800ms
linear
infinite
;
-o-animation
:
pulse
800ms
linear
infinite
;
animation
:
pulse
800ms
linear
infinite
;
}
.text-editable-wrapper
.button-wrapper
{
display
:
inline-block
;
margin-left
:
5px
;
}
/* Pulsating animation */
@keyframes
pulse
{
50
%
{
transform
:
scale
(
1.1
,
1.1
);}
100
%
{
transform
:
scale
(
1
,
1
)}
}
@-moz-keyframes
pulse
{
50
%
{
-moz-transform
:
scale
(
1.1
,
1.1
);}
100
%
{
-moz-transform
:
scale
(
1
,
1
)}
}
@-webkit-keyframes
pulse
{
50
%
{
-webkit-transform
:
scale
(
1.1
,
1.1
);}
100
%
{
-webkit-transform
:
scale
(
1
,
1
)}
}
\ No newline at end of file
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