Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper committed Aug 26, 2020
1 parent ab0433d commit 4881f79
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
8 changes: 0 additions & 8 deletions DOCUMENTATION.md

This file was deleted.

40 changes: 33 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
# statamic-blade-components
# Statamic Blade Components

![Statami v3](https://img.shields.io/badge/Statamic-3.0+-FF269E)
![Packagist](https://img.shields.io/packagist/v/octoper/statamic-blade-components)
![Test Suite](https://github.com/octoper/statamic-blade-components/workflows/Test%20Suite/badge.svg)

A Laravel Blade component integration for Statamics Antlers template engine.
A [Laravel Blade Components](https://laravel.com/docs/7.x/blade#components) integration for Statamics Antlers template engine.

## Documentation
[Read](./DOCUMENTATION.md) this addon's documentation.
## Installation
Pull in your package with composer
```bash
composer require octoper/statamic-blade-components
```

## Resources
* [Statamic 3 Docs](https://statamic.dev)
* [Statamic Discord](https://statamic.com/discord)
## General documentation
[Laravel Blade Components](https://laravel.com/docs/7.x/blade#components)

## How to be used with the Antlers template engine
```html
{{ component:hello }}
```

### Passing Initial Parameters
You can pass data into a component by passing additional parameters

```html
{{ component:avatar username="johndoe" }}
```

### Passing Slots
You can pass additional content to your component via "slots" too.

```html
{{ component:label for="email" }}
Email
{{ /component }}
```

## Security

Expand All @@ -21,3 +44,6 @@ If you discover any security related issues, please email [email protected] instead

- [Vaggelis Yfantis](https://github.com/octoper)
- [All Contributors](../../contributors)

# License
This plugin is published under the MIT license. Feel free to use it and remember to spread love.
4 changes: 3 additions & 1 deletion src/Tags/BladeComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

class BladeComponent extends Tags
{
protected static $handle = 'x';
protected static $handle = 'component';

protected static $aliases = ['x'];

public function wildcard(string $expression): string
{
Expand Down

0 comments on commit 4881f79

Please sign in to comment.