diff --git a/src/utils/convert/convertDecimalToHex.test.ts b/src/utils/convert/convertDecimalToHex.test.ts index e4c57518599bf08a445cf2355dbe750de09f87db..fa822477648b75c542da0f812a0aefa6da56f0e4 100644 --- a/src/utils/convert/convertDecimalToHex.test.ts +++ b/src/utils/convert/convertDecimalToHex.test.ts @@ -1,14 +1,15 @@ /* eslint-disable no-magic-numbers */ -import { convertDecimalToHex } from './convertDecimalToHex'; -describe('convertDecimalToHex - util', () => { +import { convertDecimalToHexColor } from './convertDecimalToHex'; + +describe('convertDecimalToHexColor - util', () => { it('should convert small decimal', () => { - expect(convertDecimalToHex(57)).toEqual('#000039'); - expect(convertDecimalToHex(0)).toEqual('#000000'); + expect(convertDecimalToHexColor(57)).toEqual('#000039'); + expect(convertDecimalToHexColor(0)).toEqual('#000000'); }); it('should convert negative decimal', () => { - expect(convertDecimalToHex(-3342388)).toEqual('#ccffcc'); - expect(convertDecimalToHex(-750)).toBe('#fffd12'); + expect(convertDecimalToHexColor(-3342388)).toEqual('#ccffcc'); + expect(convertDecimalToHexColor(-750)).toBe('#fffd12'); }); }); diff --git a/src/utils/convert/convertDecimalToHex.ts b/src/utils/convert/convertDecimalToHex.ts index 7453a6182ce52ab103d4d23e88c7dd0c15859c0b..aa3def2a55c00760207b5ec61efd730bb9ee82d0 100644 --- a/src/utils/convert/convertDecimalToHex.ts +++ b/src/utils/convert/convertDecimalToHex.ts @@ -2,7 +2,7 @@ const HEX_BASE_NUMBER = 16; const WHITE_HEX = 0xffffff; const EXPECTED_HEX_CHARS_NUMBER = 6; -export const convertDecimalToHex = (value: number): string => { +export const convertDecimalToHexColor = (value: number): string => { // eslint-disable-next-line no-bitwise const trimmedValue = value & WHITE_HEX; let colorStr = trimmedValue.toString(HEX_BASE_NUMBER); diff --git a/todo.txt b/todo.txt deleted file mode 100644 index e5ee10e44495c4f12eeda696e79d7c6473a540b0..0000000000000000000000000000000000000000 --- a/todo.txt +++ /dev/null @@ -1,14 +0,0 @@ -- poinformować zespół ze w czw się spóźnię -- Check adrian PRs -- ADD ALPHA to hex color -- render many squares -- include case with rgb and value fields -- create store, add dummy data -- on button click display dummy data -- exclude rendering reaction for it -- push PR -- Fetch data, organise structure for many overlays and turning on and off -- add few overlays for element -- push PR -- add reaction overlays -- push PR \ No newline at end of file