UNPKG

strapi-plugin-i18n

Version:

This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API

25 lines (22 loc) 576 B
const addStatusColorToLocale = (locales, theme) => locales.map(({ status, ...rest }) => { const statusMap = { 'did-not-create-locale': { backgroundColor: theme.main.colors.white, border: `1px solid ${theme.main.colors.grey}`, }, draft: { backgroundColor: theme.main.colors.mediumBlue, }, published: { backgroundColor: theme.main.colors.green, }, }; const props = statusMap[status]; return { ...props, status, ...rest, }; }); export default addStatusColorToLocale;