Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…mponents into release
  • Loading branch information
dgvai committed Jul 1, 2020
2 parents 2f646ea + bc4f1a1 commit 0c99db1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ $(()=>{
| value | Input value | null | string |
| disabled | is disabled? | false | boolean |
| required | is required? | false | boolean |
| step | HTML Attr: step | false | int |
| max | HTML Attr: max | false | int |
| maxlength | HTML Attr: maxlength | false | int |
| pattern | HTML Attr: pattern | false | regex |

#### INPUT-FILE
**REQUIRES**
Expand Down
13 changes: 12 additions & 1 deletion src/resources/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
<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}}"
@if(!is_null($step))
step="{{$step}}"
@endif
@if(!is_null($max))
max="{{$max}}"
@endif
@if(!is_null($maxlength))
maxlength="{{$maxlength}}"
@endif
@if(!is_null($pattern))
pattern="{{$pattern}}"
@endif
value="{{$value}}"
{{($required) ? 'required' : '' }}
{{($disabled) ? 'disabled' : '' }}>
Expand Down

0 comments on commit 0c99db1

Please sign in to comment.