Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a ZUIAvatar component with a background generated based on a ID. It supports 3 sizes and rounded/circular shapes.
Screenshots
Changes
Notes to reviewer
You can see different variations by viewing it in the storybook and increment/decrement the id. The same id should always result in the same background.
The background is currently a linear gradient with 2 random colors and a random rotation, a box in the top-left corner and a line in the bottom-right corner. Keeping the positions static makes the backgrounds somewhat predictable, would it be better to randomize the locations and number of colorful shapes?
The colors loaded from the palette, but the types didn't allow just loading all of them so I there's some messing with types. Would it be better to only use a list of known good colors?
Alternatively, I left some commented out code that generates colors sort of with the same "feeling" to them.
Related issues
Resolves #2505