1.0.2 • Published 2 years ago
manku_icons v1.0.2
icon-library
Icon library for use in LDaCA projects
How to Use
- Ensure you have NPM installed
- Navigate to your project root
- Run
npm i manku_icons
- Use the icons as you would any svg, controlling the size using the width and height attributes and the color with the fill attribute.
Using the Icon Library within a Vue Project
You can view a Vue Example for an example of Vue project implementation.
- Navigate to the root of your Vue project
- Install the vite svg loader and follow the Setup process
- Within your vue project, navigate to your assets folder
- Install the icon library by running
npm i manku_icons
in the terminal. - Create an Icon component in the components folder.
- Ensure that the import statement of Icon.vue (line 27) links to the folder containing the icons.
- Create an Icon component with a
name
property that equals the icons filename and add propertiessize
to control the size andcolor
to control the color e.g.<Icons name="Login" size="200" fill="blue"/>
.
Example
Vue Project Implementation
Vue Code
Manipulating the icons within a Vue Project
- The styling of the icons can be changed either in a css class that can be applied to the Vue component or the styling can be directly applied to the vue component.
- The color of an icon can be changed using
fill: ;
e.g.fill: red;
- The size of an icon can be changed using
width: ;
andheight: ;
values, e.g.width: 100px;
Adding an icon to the package
- Clone the repository
- Add icon to the repository
packages\svgs\assets\icons\
- Request to merge the new icon into the repository
How to Update the Package
- Navigate to the root directory
- Increase the "version" in package.json
- Add changes to git, commit, pull and push to main
- Run
npm publish