@digital-ai/dot-illustrations
v2.0.6
Published
A central place for the design team to keep illustrations and for dev teams to find them.
Downloads
1,465
Keywords
Readme
dot-illustrations and integrations
A central place for the design team to keep illustrations all graphical assets for dev teams to find them.
Files are organized in 2 separate folders
- illustrations
- integrations
Illustrations
In each one of those, there is a light and dark folder to match the color style if you using a material theme do not forget to update the illustration folder directory light / dark to match the theme of the switch
Illustrations usage
React Component via dot-components
(PENDING WIP): If you are already consuming dot-components
then the easiest way would be to use the DotIllustration
component, documentation is available here
Standard HTML
If not using dot-components
then import @digital-ai/dot-illustrations
into your project as an npm package or as a git submodule. You can also download the contents of this repository and copy the index.css
and asset folders into your project.
<link rel="stylesheet" href="./index.css" />
...
<span class="dot-illustration">
<img class="${illustration-ID}"/>
</span>
Integrations
Integrations usage
React Component via dot-components
COMING UP SOON
(PENDING WIP): If you are already consuming dot-components
then the easiest way would be to use the DotIllustration
component, documentation is available here
Standard HTML
If not using dot-components
then import @digital-ai/dot-illustrations
into your project as an npm package or as a git submodule. You can also download the contents of this repository and copy the ./integrations/index.css
and asset folders into your project.
<link rel="stylesheet" href="./integrations/index.css" />
...
<span class="dot-integration">
<img class="${integration-ID}"/>
</span>
Contributing
To add new illustrations, first add the new file to the appropriate location in one of the asset folders (illustrations or integrations.). The file names should not contain spaces or special characters, and they must be uniquely named project wide.
Next, add new class selectors to index.css
that set the content to your new files. Define the light version first, then if you have a dark version, define it second with an additional .dark-theme class selector. For example:
/* ------------------ GLOBAL ILLUSTRATIONS -------------------- */
/*Path: --------- './illustrations/light/global/*.svg ----- light */
/*Path: --------- './illustrations/dark/global/*.svg ------ dark */
.dot-illustration img.done.light {
content: url('./illustrations/light/global/done.svg');
}
.dot-illustration img.done.dark {
content: url('./illustrations/dark/global/done.svg');
}
Finally, update demo/script.js
by adding your new illustrations in function "doMagic" by ID name like so:
// Global arrange from A-Z
"add-new",
"add-new-grid",
"add-team",
"add-user",
"assets",
Once complete, please submit a pull request with the updated files and request someone to review in the #dot-components channel on slack.
More information is available in the .dot design system
Troubleshooting
If for some reason the latest version of dot-illustrations
is not available in dot-components
then you can update your package.json
to use the latest version of dot-illustrations
by adding the following to your resolutions
section.
"resolutions": {
"@digital-ai/dot-illustrations": "latest",
}