Skip to content

Commit

Permalink
updated to 1.0.6 with minified version
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Aug 7, 2024
1 parent 59c6832 commit 3450fc2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ npm i random-color-pearl
## Use Unpkg

```html
<script src="https://unpkg.com/random-color-pearl@1.0.0/src/randomColorSvg.js"></script>
<script src="https://unpkg.com/random-color-pearl@1.0.6/src/randomColorSvg.js"></script>
<!-- OR use minified version -->
<script src="https://unpkg.com/random-color-pearl@1.0.6/src/randomColorSvg.min.js"></script>
```

## Or Import
Expand Down Expand Up @@ -57,7 +59,7 @@ Then simply use the web component as:
<random-color-svg colors="#000000,#1c1c1c,#333333,#4d4d4d,#666666,#808080,#999999,#b3b3b3,#cccccc,#e6e6e6,#f2f2f2,#f5f5f5,#fafafa,#dcdcdc,#c0c0c0"></random-color-svg>
```

> ⚠️ Note: this will not set the color values if `username` is provided already with a truthy value. As basic purpose of profile pic/ avatar is to set unique pearls using `username` attribute, it has preference over the `colors` string.
> ⚠️ Note: this will not set the color values if `username` is provided already with a truthy value. As basic purpose of profile pic / avatar is to set unique pearls using `username` attribute, it has preference over the `colors` string.
## Get the Color values

Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="shortcut icon"
href="https://github.com/yashrajbharti/random-color-pearl/assets/43868318/46ef4432-3532-41a9-9e9a-0b6e963e3439"
type="image/x-icon">
<script src="src/randomColorSvg.js" defer></script>
<script src="src/randomColorSvg.min.js" defer></script>
<style>
body {
background-color: #2C2C2C;
Expand All @@ -20,7 +20,7 @@
</head>

<body>
<random-color-svg id="pearl-svg" width="92px" height="92px" username=""></random-color-svg>
<random-color-svg id="pearl-svg" width="92px" height="92px" username="" colors=""></random-color-svg>
<script>
document.addEventListener("DOMContentLoaded", () => {
const svg = document.getElementById("pearl-svg");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "random-color-pearl",
"version": "1.0.5",
"version": "1.0.6",
"description": "web component for random colored stylish pearl svg",
"main": "src/randomColorSvg.js",
"scripts": {
Expand Down
32 changes: 32 additions & 0 deletions src/randomColorSvg.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3450fc2

Please sign in to comment.