Fix style picker in markup modal (#1331)

- Restore correct list of styles to markup modal
- DRY lists of styles

Fix #1330
This commit is contained in:
Paul Melnikow
2017-12-05 18:08:13 -05:00
committed by GitHub
parent 81b38e6069
commit 7c1b1fc621
6 changed files with 66 additions and 37 deletions

20
lib/supported-features.js Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
const advertisedStyles = [
'plastic',
'flat',
'flat-square',
'for-the-badge',
'social',
];
const validStyles = advertisedStyles.concat(['default', '_shields_test']);
function isValidStyle(style) {
return style ? validStyles.indexOf(style) >= 0 : false;
}
module.exports = {
advertisedStyles,
isValidStyle,
};