Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70eb38b

Browse files
committed
fix task background color
1 parentc10c913 commit70eb38b

File tree

4 files changed

+4
-34
lines changed

4 files changed

+4
-34
lines changed

‎lib/components/page/task.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ var TaskContent = function (_a) {
3434
};
3535
exports.Task=function(_a){
3636
vartask=_a.task,taskPosition=_a.taskPosition,index=_a.index,runTests=_a.runTests;
37-
vartaskClass='cr-task';
38-
if(index<taskPosition){
39-
taskClass+=' isCompletedTask';
40-
}
41-
elseif(index===taskPosition){
42-
taskClass+='isCurrentTask';
43-
}
44-
return(React.createElement(material_ui_1.ListItem,{key:index,className:taskClass},React.createElement(TaskCheckbox,{index:index,taskPosition:taskPosition,runTests:runTests}),React.createElement(TaskIndex,{index:index}),React.createElement(TaskContent,{task:task})));
37+
varisCompleted=index<taskPosition;
38+
return(React.createElement(material_ui_1.ListItem,{key:index,className:'cr-task',style:{backgroundColor:isCompleted ?'#c8e6c9' :'inherit'}},React.createElement(TaskCheckbox,{index:index,taskPosition:taskPosition,runTests:runTests}),React.createElement(TaskIndex,{index:index}),React.createElement(TaskContent,{task:task})));
4539
};
4640
exports.Tasks=function(_a){
4741
vartasks=_a.tasks,taskPosition=_a.taskPosition,runTests=_a.runTests;

‎src/components/page/_page.less

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
.cr-page {
22
position:relative;
33
width:400px;
4-
.isCompletedTask {
5-
background-color:#c8e6c9;
6-
}
7-
.isCompleteTask:hover {
8-
background-color:#c8e6c9;
9-
}
10-
.isCurrentTask {}
11-
.isDisabledTask {
12-
color:grey;
13-
}
144
&-toolbar {
155
position:fixed;
166
bottom:0;

‎src/components/page/task.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@ const TaskContent = ({task}) => (
3535
);
3636

3737
exportconstTask=({task, taskPosition, index, runTests})=>{
38-
lettaskClass='cr-task';
39-
if(index<taskPosition){
40-
taskClass+=' isCompletedTask';
41-
}elseif(index===taskPosition){
42-
taskClass+='isCurrentTask';
43-
}
38+
constisCompleted=index<taskPosition;
4439
return(
45-
<ListItemkey={index}className={taskClass}>
40+
<ListItemkey={index}className='cr-task'style={{backgroundColor:isCompleted ?'#c8e6c9' :'inherit'}}>
4641
<TaskCheckboxindex={index}taskPosition={taskPosition}runTests={runTests}/>
4742
<TaskIndexindex={index}/>
4843
<TaskContenttask={task}/>

‎styles/styles.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ atom-panel-container > atom-panel > #crv {
4747
position: relative;
4848
width:400px;
4949
}
50-
.cr-page .isCompletedTask {
51-
background-color:#c8e6c9;
52-
}
53-
.cr-page .isCompleteTask:hover {
54-
background-color:#c8e6c9;
55-
}
56-
.cr-page .isDisabledTask {
57-
color: grey;
58-
}
5950
.cr-page-toolbar {
6051
position: fixed;
6152
bottom:0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp