Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added a hook for generating a unique color #1565

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gshteynardt
Copy link

No description provided.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

src/hooks/useGeneratorColor/README.md Outdated Show resolved Hide resolved
src/hooks/index.ts Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/README.md Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/__stories__/Color.tsx Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/utils/color.ts Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/utils/color.ts Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/utils/constants.ts Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/utils/getHue.ts Outdated Show resolved Hide resolved
src/hooks/useGeneratorColor/utils/randomIndex.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/__tests__/getHue.test.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/color.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/README.md Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/types.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/useColorGenerator.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/useColorGenerator.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/useColorGenerator.ts Outdated Show resolved Hide resolved
src/hooks/useColorGenerator/README.md Outdated Show resolved Hide resolved
@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

| token | Unique attribute of the entity (e.g., name, id, email) | `string` | | | |
| colorKeys | If an array of colors is passed, an index is generated from the token passed, and the value from the color array at that index is returned | `string[]` | | | |
| Name | Description | Type | Default | | |
| :-------- | :----------------------------------------------------- | :----------------------- | :-----: | --- | --- |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type column should also be centered. Also markdown seems broken.

...props,
theme,
}),
[props, theme],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props is an object, better to pass individual props

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants