mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
This is an update of https://github.com/Aurorastation/Aurora.3/pull/19561 for BYOND 516. Overall I think it's much cleaner. It makes use of CSS variables and doesn't change the overall structure of the html like the last PR. Let me know if any improvements can be made.  Example. The left border and background highlight color will be the last in the highlight settings.
23 lines
457 B
JavaScript
23 lines
457 B
JavaScript
/**
|
|
* @file
|
|
*/
|
|
import { createUuid } from 'common/uuid';
|
|
|
|
export const createHighlightSetting = (obj) => ({
|
|
id: createUuid(),
|
|
highlightText: '',
|
|
highlightColor: '#ffdd44',
|
|
highlightWholeMessage: true,
|
|
backgroundHighlightColor: '#ffdd44',
|
|
backgroundHighlightOpacity: 10,
|
|
matchWord: false,
|
|
matchCase: false,
|
|
...obj,
|
|
});
|
|
|
|
export const createDefaultHighlightSetting = (obj) =>
|
|
createHighlightSetting({
|
|
id: 'default',
|
|
...obj,
|
|
});
|