1.4.8 • Published 10 months ago

ankh-hooks v1.4.8

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Ankhorage Hooks

This is a library of hooks (functions) covering different categories.

Color

Collection of hooks related to color

useColorContrast()

By default the contrast will be rounded to 2 decimals but you can change this as a third param.

const { useColorContrastFromHex } = useColorContrast();

useColorContrastFromHex("#767676", "#ffffff");
// Output: 4.54

useColorContrastFromHex("#abcdef", "#fbcdaa", 4);
// Output: 1.1341

useColorConverter()

Documentation to follow

useColorHelper()

Documentation to follow

useColorHues()

Documentation to follow

useColorLuminance()

Documentation to follow

useColorPalette()

Documentation to follow

useColorParser()

Documentation to follow

useColorValidator()

Documentation to follow

MDD

Metric driven design

useError()

Enable logging will useLogging to either write a log to a provide API (C)rud Create function or if not provided console.log().

const { useFatalError } = useError();

useFatalError("Something went wrong!", {enableLogging: true});"

useLogging()

const { writeLog } = useAnkhLogging();

Static

Static file handling

useSvg()

Dynamically load an SVG icon

const SvgComponent = useSvg("house");
1.4.6

10 months ago

1.4.5

10 months ago

1.4.4

10 months ago

1.4.8

10 months ago

1.4.7

10 months ago

1.4.3

11 months ago

1.4.2

11 months ago

1.4.1

11 months ago

1.4.0

11 months ago

1.3.29

11 months ago

1.2.0

11 months ago

1.2.8

11 months ago

1.2.7

11 months ago

1.0.9

11 months ago

1.2.6

11 months ago

1.2.5

11 months ago

1.2.4

11 months ago

1.2.3

11 months ago

1.2.2

11 months ago

1.2.1

11 months ago

1.3.10

11 months ago

1.3.13

11 months ago

1.3.14

11 months ago

1.3.11

11 months ago

1.3.12

11 months ago

1.3.17

11 months ago

1.3.18

11 months ago

1.3.15

11 months ago

1.3.16

11 months ago

1.3.19

11 months ago

1.3.20

11 months ago

1.3.21

11 months ago

1.3.9

11 months ago

1.3.8

11 months ago

1.3.24

11 months ago

1.3.25

11 months ago

1.3.22

11 months ago

1.3.23

11 months ago

1.3.28

11 months ago

1.3.26

11 months ago

1.3.27

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.3.7

11 months ago

1.3.6

11 months ago

1.3.5

11 months ago

1.3.4

11 months ago

1.3.3

11 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

11 months ago

1.1.2

11 months ago

1.2.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago