mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-16 01:10:30 +02:00
Add guidelines data to NPM package and documenation (#5342)
This commit is contained in:
parent
92212600b0
commit
9fdbb57ccc
@ -66,12 +66,14 @@ console.log(icon);
|
||||
source: 'https://simpleicons.org/',
|
||||
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>',
|
||||
path: 'M12 12v-1.5c-2.484 ...',
|
||||
guidelines: 'https://simpleicons.org/styleguide',
|
||||
license: {
|
||||
type: '...',
|
||||
url: 'https://example.com/'
|
||||
}
|
||||
}
|
||||
|
||||
NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon.
|
||||
NOTE: the `license` entry will be `undefined` if we do not yet have license data for the icon.
|
||||
*/
|
||||
```
|
||||
@ -96,12 +98,14 @@ console.log(icon);
|
||||
source: 'https://simpleicons.org/',
|
||||
svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>',
|
||||
path: 'M12 12v-1.5c-2.484 ...',
|
||||
guidelines: 'https://simpleicons.org/styleguide',
|
||||
license: {
|
||||
type: '...',
|
||||
url: 'https://example.com/'
|
||||
}
|
||||
}
|
||||
|
||||
NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines data for the icon.
|
||||
NOTE: the license may be `undefined` if there is no license data for the icon.
|
||||
*/
|
||||
```
|
||||
|
@ -56,6 +56,7 @@ function iconToObject(icon) {
|
||||
escape(icon.svg),
|
||||
escape(icon.source),
|
||||
escape(icon.hex),
|
||||
icon.guidelines ? `'${escape(icon.guidelines)}'` : undefined,
|
||||
licenseToObject(icon.license),
|
||||
);
|
||||
}
|
||||
|
@ -7,5 +7,6 @@
|
||||
},
|
||||
source: '%s',
|
||||
hex: '%s',
|
||||
guidelines: %s,
|
||||
license: %s,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user