Skip to content

Commit

Permalink
Merge pull request #7 from chrisabey84/master
Browse files Browse the repository at this point in the history
Added ability to add placeholders to input and text area components
  • Loading branch information
chrisrhymes authored Jun 29, 2021
2 parents e951af8 + 3e99066 commit d602cf0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/views/components/horizontal-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class="input @if($errors->has($name)) is-danger @endif"
@endif
@if($required) required @endif
@if($readonly) readonly @endif
@if($attributes->has('placeholder')) placeholder="{{ $attributes->get('placeholder') }}" @endif
/>
<x-bbui::error name="{{ $name }}"></x-bbui::error>
</div>
Expand Down
1 change: 1 addition & 0 deletions resources/views/components/horizontal-textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class="textarea @if($errors->has($name)) is-danger @endif"
@if($attributes->has('wire:model')) wire:model="{{ $attributes->whereStartsWith('wire:model')->first() }}" @endif
@if($required) required @endif
@if($readonly) readonly @endif
@if($attributes->has('placeholder')) placeholder="{{ $attributes->get('placeholder') }}" @endif
>{{ old($name, $value) }}</textarea>
<x-bbui::error name="{{ $name }}"></x-bbui::error>
</div>
Expand Down
1 change: 1 addition & 0 deletions resources/views/components/input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class="input @error($name) is-danger @enderror"
@endif
@if($required) required @endif
@if($readonly) readonly @endif
@if($attributes->has('placeholder')) placeholder="{{ $attributes->get('placeholder') }}" @endif
/>
<x-bbui::error name="{{ $name }}"></x-bbui::error>
</div>
Expand Down
1 change: 1 addition & 0 deletions resources/views/components/textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class="textarea @if($errors->has($name)) is-danger @endif"
@if($attributes->has('wire:model')) wire:model="{{ $attributes->whereStartsWith('wire:model')->first() }}" @endif
@if($required) required @endif
@if($readonly) readonly @endif
@if($attributes->has('placeholder')) placeholder="{{ $attributes->get('placeholder') }}" @endif
>{{ old($name, $value) }}</textarea>
<x-bbui::error name="{{ $name }}"></x-bbui::error>
</div>
Expand Down

0 comments on commit d602cf0

Please sign in to comment.