-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation and a license file
- Loading branch information
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
MIT License | ||
|
||
Copyright (c) 2020 Emmanuel Raymond | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# vue-initials-placeholder | ||
|
||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
|
||
> A vue component that uses parsed initials as placeholders. Can be used as a substitute for absent user profile photo. | ||
![preview image](preview.png) | ||
|
||
## Installation | ||
```bash | ||
# yarn | ||
yarn add vue-initials-placeholder | ||
|
||
# npm | ||
npm i --save vue-initials-placeholder | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
<script> | ||
import VueInitialsPlaceholder from 'vue-initials-placeholder.vue' | ||
|
||
export default { | ||
components: { | ||
VueInitialsPlaceholder | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<VueInitialsPlaceholder value="Emmanuel Raymond"/> | ||
</div> | ||
</template> | ||
``` | ||
### Props | ||
|
||
|Name|Type|Default|Description|Required | ||
|---|---|---|---|---| | ||
|value|String|null|The name you want to parse as placeholder | true | ||
|bgColor|String|#4285F4|Background color - [color name, rgb or hex] | false | ||
|size|String|40|The width and height of the container that contains the initials in px| false | ||
|textColor|String|#fff|Text color of the initials - [color name, rgb or hex]| false | ||
|fontSize|String|18|Font size of the initials in px|false | ||
|
||
## Acknowledgement | ||
|
||
This package was inspired by [Initials-placeholder-react](https://github.com/ozorku/Initials-placeholder-react) | ||
|
||
## Contributing | ||
If you would like to report bugs or request a feature, please create a new [issue](https://github.com/peoray/vue-initials-placeholder/issues/new). | ||
|
||
If you'd like to contribute to the code: | ||
|
||
- Fork it! | ||
- Create your feature branch: `git checkout -b feature-name` | ||
- Commit your changes: `git commit -am 'Some commit message'` | ||
- Push to the branch: `git push origin feature-name` | ||
- Submit a pull request! | ||
|
||
## License | ||
This project is released under the terms of the [MIT](LICENSE) License | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.