Глобальный рефакторинг SettingsPage (в процессе)

This commit is contained in:
Book Pauk
2022-10-12 20:24:08 +07:00
parent bc0c9932c8
commit 528b32ccf7
10 changed files with 353 additions and 277 deletions

View File

@@ -0,0 +1,9 @@
const hex = /^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/;
export function colorPanStyle(bgColor) {
return `width: 30px; height: 30px; border: 1px solid black; border-radius: 4px; background-color: ${bgColor}`;
}
export function isHexColor(value) {
return hex.test(value);
}