偏右
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
6 deletions
-
scripts/azure-github-comment.js
-
site/theme/template/Color/ColorPaletteToolDark.jsx
-
site/theme/template/Color/Palette.jsx
|
|
@ -33,6 +33,7 @@ async function withGithub(url, json, method) { |
|
|
|
|
|
|
|
// Find my comment
|
|
|
|
const updateComment = comments.find(({ body }) => body.includes(REPLACE_MARK)); |
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
console.log('Origin comment:', updateComment); |
|
|
|
|
|
|
|
// Update
|
|
|
@ -51,5 +52,6 @@ async function withGithub(url, json, method) { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
console.log(res); |
|
|
|
})(); |
|
|
|
|
|
@ -13,8 +13,6 @@ export default class ColorPaletteTool extends Component { |
|
|
|
primaryColor: '#1890ff', |
|
|
|
backgroundColor: '#141414', |
|
|
|
primaryColorInstance: null, |
|
|
|
// eslint-disable-next-line react/no-unused-state |
|
|
|
backgroundColorInstance: null, |
|
|
|
}; |
|
|
|
|
|
|
|
handleChangeColor = (e, color) => { |
|
|
@ -25,12 +23,10 @@ export default class ColorPaletteTool extends Component { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
handleChangeBackgroundColor = (e, color) => { |
|
|
|
handleChangeBackgroundColor = (e) => { |
|
|
|
const value = e.target ? e.target.value : e; |
|
|
|
this.setState({ |
|
|
|
backgroundColor: value, |
|
|
|
// eslint-disable-next-line react/no-unused-state |
|
|
|
backgroundColorInstance: color, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -42,7 +42,7 @@ export default class Palette extends React.Component { |
|
|
|
const colorPaletteMap = { |
|
|
|
dark: ['#fff', 'unset'], |
|
|
|
default: ['rgba(0,0,0,0.85)', '#fff'], |
|
|
|
} |
|
|
|
}; |
|
|
|
const [lastColor, firstColor] = dark ? colorPaletteMap.dark : colorPaletteMap.default; |
|
|
|
for (let i = 1; i <= count; i += 1) { |
|
|
|
const colorText = `${name}-${i}`; |
|
|
|