36 },
37 });
38
39 const attribute = options.entityUnit.length > 0 ? " " + options.entityUnit : "";40
41 const handleClick = React.useCallback(() => {
42 if (isEditMode) {
32
33 return rgbaColors.map((color) => {
34 return (
35 "#" +36 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion37 color38 .split("(")[1]!39 .replaceAll(" ", "")40 .replace(")", "")41 .split(",")42 .map((color) => parseInt(color, 10))43 .slice(0, 3)44 .map((color) => color.toString(16).padStart(2, "0"))45 .join("")46 );
47 }) as unknown as MantineColorsTuple;
48};
36 },
37 });
38
39 const attribute = options.entityUnit.length > 0 ? " " + options.entityUnit : "";40
41 const handleClick = React.useCallback(() => {
42 if (isEditMode) {
36 },
37 });
38
39 const attribute = options.entityUnit.length > 0 ? " " + options.entityUnit : "";40
41 const handleClick = React.useCallback(() => {
42 if (isEditMode) {
36 },
37 });
38
39 const attribute = options.entityUnit.length > 0 ? " " + options.entityUnit : "";40
41 const handleClick = React.useCallback(() => {
42 if (isEditMode) {
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";