Skip to content

Commit

Permalink
docs: add documentation and a license file
Browse files Browse the repository at this point in the history
  • Loading branch information
peoray committed Nov 3, 2020
1 parent 65ccebb commit f08386b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
22 changes: 22 additions & 0 deletions LICENSE
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.
65 changes: 65 additions & 0 deletions README.md
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


Binary file added preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f08386b

Please sign in to comment.