Skip to content

Commit 0b16252

Browse files
authored
Merge pull request #1105 from primer/VanAnderson/add-state-labels-back-to-theme
Add stateLabels back to theme-preval
2 parents a300955 + e61f0b4 commit 0b16252

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

src/theme-preval.js

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,40 @@ const pagination = {
319319
}
320320
}
321321

322+
const stateLabels = {
323+
sizes: {
324+
small: {
325+
padding: `${space[1]} ${space[2]}`,
326+
fontSize: fontSizes[0]
327+
},
328+
normal: {
329+
padding: `${space[2]} 12px`,
330+
fontSize: fontSizes[1]
331+
}
332+
},
333+
334+
status: {
335+
issueClosed: {
336+
backgroundColor: red[5]
337+
},
338+
pullClosed: {
339+
backgroundColor: red[5]
340+
},
341+
pullMerged: {
342+
backgroundColor: purple[5]
343+
},
344+
issueOpened: {
345+
backgroundColor: '#159739' // custom green
346+
},
347+
pullOpened: {
348+
backgroundColor: '#159739' // custom green
349+
},
350+
draft: {
351+
backgroundColor: gray[5]
352+
}
353+
}
354+
}
355+
322356
const {scale: _excludeScaleColors, ...functionalColors} = filterObject(primitives.colors.light, value =>
323357
isColorValue(value)
324358
)
@@ -348,7 +382,8 @@ const theme = {
348382
pagination,
349383
popovers,
350384
flash,
351-
flashIcon
385+
flashIcon,
386+
stateLabels
352387
}
353388

354389
module.exports = {

0 commit comments

Comments
 (0)