Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…mponents into release
  • Loading branch information
dgvai committed Jun 21, 2020
2 parents 17c6f6c + 35c25c3 commit 0f67e92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,10 @@ This package contains [Laravel Blade Components](https://laravel.com/docs/7.x/bl
- [Installation](#installation)
- [Extract Plugins](#extract-plugins)
- [Configurations](#configurations)
- [Components](#components)
- [Widgets](#widgets)
- [**INFO BOX**](#info-box)
- [**SMALL BOX**](#small-box)
- [**CARDS**](#cards)
- [**ALERT**](#alert)
- [**CALLOUT**](#callout)
- [**PROGRESS**](#progress)
- [**PROFILE FLAT**](#profile-flat)
- [**PROFILE WIDGET**](#profile-widget)
- [**MODAL**](#modal)
- [**DATATABLE**](#datatable)
- [Form Components](#form-components)
- [INPUT](#input)
- [INPUT-FILE](#input-file)
- [INPUT-COLOR](#input-color)
- [INPUT-DATE](#input-date)
- [DATE-RANGE](#date-range)
- [INPUT-SWITCH](#input-switch)
Expand Down Expand Up @@ -421,6 +409,11 @@ $(()=>{
| value | Input value | null | string |
| disabled | is disabled? | false | boolean |
| required | is required? | false | boolean |
| step | attr: step | null | string |
| max | attr: max | null | string |
| maxlength | attr: maxlength | null | string |
| pattern | attr: pattern | null | string |


#### INPUT-FILE
**REQUIRES**
Expand Down
8 changes: 7 additions & 1 deletion src/Components/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ class Input extends Component
public $type, $id, $name, $label, $placeholder;
public $topclass, $inputclass;
public $value, $disabled, $required;
public $step, $max, $maxlength, $pattern;

public function __construct(
$type = 'text', $id = null, $name = null,
$label = 'Input Label', $placeholder = null,
$topclass = null, $inputclass = null,
$value = null, $disabled = false, $required = false
$value = null, $disabled = false, $required = false,
$step = null, $max = null, $maxlength = null, $pattern = null
)
{
$this->type = $type;
Expand All @@ -27,6 +29,10 @@ public function __construct(
$this->value = $value;
$this->required = $required;
$this->disabled = $disabled;
$this->step = $step;
$this->max = $max;
$this->maxlength = $maxlength;
$this->pattern = $pattern;
}

public function render()
Expand Down
1 change: 1 addition & 0 deletions src/resources/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<label for="{{$id}}">{{$label}}</label>
<input type="{{$type}}" class="{{$inputclass}} form-control @error($name) is-invalid @enderror"
id="{{$id}}" name="{{$name}}" placeholder="{{$placeholder}}"
step="{{$step}}" max="{{$max}}" maxlength="{{$maxlength}}" pattern="{{$pattern}}"
value="{{$value}}"
{{($required) ? 'required' : '' }}
{{($disabled) ? 'disabled' : '' }}>
Expand Down

0 comments on commit 0f67e92

Please sign in to comment.