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

Commitb28a45c

Browse files
committed
repair alert colors: green, pink, blue
1 parentffa3c6c commitb28a45c

File tree

8 files changed

+30
-15
lines changed

8 files changed

+30
-15
lines changed

‎lib/components/Alert/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ var defaultAlert = {
2323
action:'NOTE',
2424
};
2525
varstyles={
26-
display:'inline-block',
27-
margin:'0px 10px',
26+
snackbar:{
27+
display:'inline-block',
28+
margin:'0px 10px',
29+
},
2830
};
2931
varAlert=(function(_super){
3032
__extends(Alert,_super);
@@ -33,8 +35,8 @@ var Alert = (function (_super) {
3335
}
3436
Alert.prototype.render=function(){
3537
var_a=this.props,alert=_a.alert,alertClose=_a.alertClose;
36-
varaction=alert.action,message=alert.message,open=alert.open,duration=alert.duration,color=alert.color;
37-
return(React.createElement(Snackbar_1.default,{style:styles,bodyStyle:{color:color},open:open,action:action||'NOTE',message:message||'',autoHideDuration:duration||2000,onActionTouchTap:alertClose,onRequestClose:alertClose}));
38+
varaction=alert.action,message=alert.message,open=alert.open,duration=alert.duration;
39+
return(React.createElement(Snackbar_1.default,{className:'cr-alert '+action,style:styles.snackbar,open:open,action:action||'NOTE',message:message||'',autoHideDuration:duration||2000,onActionTouchTap:alertClose,onRequestClose:alertClose}));
3840
};
3941
Alert=__decorate([
4042
react_redux_1.connect(function(state){return({

‎lib/modules/alert/reducer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ var _alert = {
1010
open:false,
1111
action:'NOTE',
1212
duration:1500,
13-
color:colors.NOTE
13+
color:colors.NOTE,
1414
};
1515
varopen={
1616
open:true,
1717
action:'NOTE',
18-
duration:1500
18+
duration:1500,
1919
};
2020
varcurrent=_alert;
2121
functionsetAlert(a){

‎lib/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ var core_coderoad_1 = require('core-coderoad');
44
Object.defineProperty(exports,"__esModule",{value:true});
55
exports.default=core_coderoad_1.configureStore({
66
reducer:reducers_1.default,
7-
devMode:false,
7+
devMode:true,
88
throttle:{TEST_RUN:800},
99
});

‎src/components/Alert/_alert.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* Style Alert Button*/
2+
.cr-alert.PASS>div>div>button>div>span {
3+
color:#73C990;// green
4+
}
5+
.cr-alert.FAIL>div>div>button>div>span {
6+
color:#FF4081;// pink
7+
}
8+
.cr-alert.NOTE>div>div>button>div>span {
9+
color:#9DA5B4;// blue
10+
}

‎src/components/Alert/index.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ const defaultAlert = {
1111
};
1212

1313
conststyles={
14-
display:'inline-block',
15-
margin:'0px 10px',
14+
snackbar:{
15+
display:'inline-block',
16+
margin:'0px 10px',
17+
},
1618
};
1719

1820
@connect(state=>({
@@ -23,11 +25,11 @@ export default class Alert extends React.Component<{
2325
},{}>{
2426
publicrender(){
2527
const{alert, alertClose}=this.props;
26-
const{action, message, open, duration, color}=alert;
28+
const{action, message, open, duration}=alert;
2729
return(
2830
<Snackbar
29-
style={styles}
30-
bodyStyle={{color}}
31+
className={'cr-alert '+action}
32+
style={styles.snackbar}
3133
open={open}
3234
action={action||'NOTE'}
3335
message={message||''}

‎src/components/styles/index.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import'ui-variables';
22
@import'../AppMenu/_app-menu';
3+
@import'../Alert/_alert';
34
#crv {
45
position:relative;
56
overflow-y:scroll;

‎src/modules/alert/reducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const _alert: CR.Alert = {
1111
open:false,
1212
action:'NOTE',
1313
duration:1500,
14-
color:colors.NOTE
14+
color:colors.NOTE,
1515
};
1616

1717
constopen={
1818
open:true,
1919
action:'NOTE',
20-
duration:1500
20+
duration:1500,
2121
};
2222

2323
letcurrent:CR.Alert=_alert;

‎src/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import {configureStore} from 'core-coderoad';
33

44
exportdefaultconfigureStore({
55
reducer,
6-
devMode:false,
6+
devMode:true,
77
throttle:{TEST_RUN:800},
88
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp