Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
patressz committed Oct 31, 2023
1 parent 48bc07c commit 4a6208e
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 1 deletion.
25 changes: 25 additions & 0 deletions src/Components/Form/Check.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Patressz\LaravelBladeComponents\Components\Form;

use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class Check extends Component
{
/**
* Create a new component instance.
*/
public function __construct(public ?string $framework = null)
{
$this->framework = $framework ?? config('blade-components.css_framework', 'tailwind');
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View
{
return view("blade-components::components.{$this->framework}.form.check");
}
}
2 changes: 1 addition & 1 deletion src/Components/Form/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Input extends Component
*/
public function __construct(public ?string $framework = null)
{
$this->framework = $framework ?? config('blade-components.css_framework', 'bootstrap');
$this->framework = $framework ?? config('blade-components.css_framework', 'tailwind');
}

/**
Expand Down
25 changes: 25 additions & 0 deletions src/Components/Form/MultiCheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Patressz\LaravelBladeComponents\Components\Form;

use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class MultiCheck extends Component
{
/**
* Create a new component instance.
*/
public function __construct(public ?string $framework = null)
{
$this->framework = $framework ?? config('blade-components.css_framework', 'tailwind');
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View
{
return view("blade-components::components.{$this->framework}.form.multi-check");
}
}
25 changes: 25 additions & 0 deletions src/Components/Form/Select.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Patressz\LaravelBladeComponents\Components\Form;

use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class Select extends Component
{
/**
* Create a new component instance.
*/
public function __construct(public ?string $framework = null)
{
$this->framework = $framework ?? config('blade-components.css_framework', 'tailwind');
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View
{
return view("blade-components::components.{$this->framework}.form.select");
}
}
25 changes: 25 additions & 0 deletions src/Components/Form/Textarea.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Patressz\LaravelBladeComponents\Components\Form;

use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

class Textarea extends Component
{
/**
* Create a new component instance.
*/
public function __construct(public ?string $framework = null)
{
$this->framework = $framework ?? config('blade-components.css_framework', 'tailwind');
}

/**
* Get the view / contents that represent the component.
*/
public function render(): View
{
return view("blade-components::components.{$this->framework}.form.textarea");
}
}

0 comments on commit 4a6208e

Please sign in to comment.