Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...colors.map(color => ({
id: color,
label: localizedColorLabel(color),
handler: () => {
quip.apps.getRootRecord().set("color", color);
refreshToolbar();
},
isHeader: false,
})),
{
...colors.map(color => ({
id: color,
label: localizedColorLabel(color),
handler: () => {
quip.apps.getRootRecord().set("color", color);
quip.apps.updateToolbarCommandsState([], [color]);
quip.apps.recordQuipMetric("set_color");
},
isHeader: false,
})),
],
...colors.map(color => ({
id: color,
label: localizedColorLabel(color),
handler: (name, context) => {
const cardRecord = context.cardRecord;
if (cardRecord.isHeader()) {
cardRecord.getColumn().setColor(color);
} else {
cardRecord.setColor(color);
}
refreshToolbar();
},
})),
];
...colors.map(color => ({
id: color,
label: localizedColorLabel(color),
handler: () => {
quip.apps.getRootRecord().set("color", color);
quip.apps.updateToolbarCommandsState([], [color]);
quip.apps.recordQuipMetric("set_color");
},
isHeader: false,
})),
];
...colors.map(color => ({
id: color,
label: localizedColorLabel(color),
handler: () => {
selectedEvent.setColor(color);
refreshToolbar();
},
})),
];