classnames-0.1.0
توضیحات
Utility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | classnames-0.1.0 |
| نام | classnames |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Luca Faggianelli |
| ایمیل نویسنده | luca.faggianelli@gmail.com |
| آدرس صفحه اصلی | https://github.com/lucafaggianelli/python-classnames |
| آدرس اینترنتی | https://pypi.org/project/classnames/ |
| مجوز | MIT license |
# Python classnames
[](https://pypi.org/project/classnames/)
[](https://pypi.org/project/classnames/)
[](https://github.com/lucafaggianelli/python-classnames/actions/workflows/dev.yml)
[](https://codecov.io/github/lucafaggianelli/python-classnames)
Utility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.
This project is a Python porting of the JS library [`classnames`](https://github.com/JedWatson/classnames)
## Show me the code!
```bash
pip install classnames
```
```python
from classnames import class_names
# render_button() -> "btn btn--red"
# render_button(rounded=True) -> "btn btn--rounded btn--red"
def render_button(rounded: bool = False, color = "red"):
class_names("btn", f"btn--{color}", {
"btn--rounded": rounded
})
```
* Documentation: <https://lucafaggianelli.github.io/python-classnames>
* GitHub: <https://github.com/lucafaggianelli/python-classnames>
* PyPI: <https://pypi.org/project/python-classnames/>
## Features
* TODO
## Credits
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].
## [Unreleased]
## [0.1.0] - 2022-11-04
- initial release
<!-- Links -->
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html
<!-- Versions -->
[unreleased]: https://github.com/lucafaggianelli/python-classnames/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/lucafaggianelli/python-classnames/releases/tag/v0.1.0
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl classnames-0.1.0:
pip install classnames-0.1.0.whl
نصب پکیج tar.gz classnames-0.1.0:
pip install classnames-0.1.0.tar.gz