Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 21ea422

Browse files
committed
Update formatting
1 parent e9801e3 commit 21ea422

File tree

14 files changed

+73
-37
lines changed

14 files changed

+73
-37
lines changed

docs/advanced-usage/customizing-css.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Beware: you will have to manually keep this CSS in sync with changes in future p
3333
```css
3434
/* app.css */
3535

36-
... @import "custom/laravel-form-components.css";
36+
...
37+
38+
@import "custom/laravel-form-components.css";
3739
```
3840

3941
Let's say you wanted to change the spacing in stacked checkbox groups. You could do so like this in the file you just created with the pasted in styles from the package:
@@ -161,7 +163,9 @@ Some styling for components, such as text color and border colors, can be overri
161163
you could add the following to your app's CSS file:
162164

163165
```css
164-
... :root {
166+
...
167+
168+
:root {
165169
--input-border-color: theme("colors.green.300");
166170
--input-dark-border-color: theme("colors.green.500");
167171
}

docs/files/file-upload.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ This slot is completely optional, and can be omitted if you don't need to show a
5959
<x-file-upload name="avatar" wire:model="avatar">
6060
<div>
6161
@if ($avatar)
62-
<span class="block w-20 h-20">
63-
<img
64-
class="rounded-full w-full"
65-
src="{{ $avatar->temporaryUrl() }}"
66-
/>
67-
</span>
62+
<span class="block w-20 h-20">
63+
<img
64+
class="rounded-full w-full"
65+
src="{{ $avatar->temporaryUrl() }}"
66+
/>
67+
</span>
6868
@endif
6969
</div>
7070
</x-file-upload>

docs/files/filepond.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ specify an option callbacks, such as `onaddfile`, that you need to:
113113

114114
```html
115115
<x-file-pond wire:model="avatar">
116-
<x-slot:config> onaddfile(error, file) { // do stuff }, </x-slot:config>
116+
<x-slot:config>
117+
onaddfile(error, file) {
118+
// do stuff
119+
},
120+
</x-slot:config>
117121
</x-file-pond>
118122
```
119123

docs/form/form-error.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Now we'll use the component's slot and its `messages()` method to render an unor
6363
```html
6464
<x-form-error tag="ul" name="first_name">
6565
@foreach ($component->messages($errors) as $error)
66-
<li>{{ $error }}</li>
66+
<li>{{ $error }}</li>
6767
@endforeach
6868
</x-form-error>
6969
```

docs/form/form-group.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ optional.
9999
You can also have the component render the text `Optional` automatically for you by passing in `true` for the `optional` attribute.
100100

101101
```html
102-
<x-form-group label="First name" name="first_name" optional> ... </x-form-group>
102+
<x-form-group label="First name" name="first_name" optional>
103+
...
104+
</x-form-group>
103105
```
104106

105107
You can customize this text by modifying the config value for `optional_hint_text`.
@@ -151,7 +153,9 @@ The form-group component will now add a `mb-5` margin utility class to each form
151153
bit of breathing room from each other. The last form-group child in a container will have no margin bottom because of the `last:mb-0` utility class. If you don't want margins to be added to each form-group, you can do the following:
152154

153155
```html
154-
<x-form-group label="First name" :margin-bottom="false"> ... </x-form-group>
156+
<x-form-group label="First name" :margin-bottom="false">
157+
...
158+
</x-form-group>
155159
```
156160

157161
> {tip} To help space your form elements evenly in a form, you could also use a `space-y-*` utility class

docs/form/form.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ and CSRF directives and allows for easier to use syntax than the default HTML fo
1313
The most basic usage of the `form` component exists in encapsulating some form elements:
1414

1515
```html
16-
<x-form action="https://example.com"> Form fields... </x-form>
16+
<x-form action="https://example.com">
17+
Form fields...
18+
</x-form>
1719
```
1820

1921
This will output the following HTML:
@@ -53,7 +55,9 @@ As you can see, a `_method` input was added since HTML tags only support `POST`
5355
To enable file uploads in a form you can make use of the `has-files` attribute:
5456

5557
```html
56-
<x-form action="https://example.com" has-files> Form fields... </x-form>
58+
<x-form action="https://example.com" has-files>
59+
Form fields...
60+
</x-form>
5761
```
5862

5963
This will output the following HTML:

docs/inputs/checkbox-group.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ with each other, by setting the `stacked` attribute to `false`. This will displa
3939
By default, the checkbox-group renders checkboxes in rows with 3 columns when it is rendered inline. To render a different amount of columns, you can specify the `grid-cols` attribute:
4040

4141
```html
42-
<x-checkbox-group :stacked="false" grid-cols="5"> ... </x-checkbox-group>
42+
<x-checkbox-group :stacked="false" grid-cols="5">
43+
...
44+
</x-checkbox-group>
4345
```
4446

4547
## Sizing
@@ -48,7 +50,9 @@ For convenience, you can size all the radio or checkbox elements the same by usi
4850
the config value for radios and checkboxes.
4951

5052
```html
51-
<x-checkbox-group input-size="lg">...</x-checkbox-group>
53+
<x-checkbox-group input-size="lg">
54+
...
55+
</x-checkbox-group>
5256
```
5357

5458
For more information on the sizing, checkout the [Sizing](/docs/laravel-form-components/{version}/inputs/checkbox#user-content-sizing) documentation for checkboxes.

docs/inputs/checkbox.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ Via prop:
3030
Via slot:
3131

3232
```html
33-
<x-checkbox name="remember_me"> Remember me </x-checkbox>
33+
<x-checkbox name="remember_me">
34+
Remember me
35+
</x-checkbox>
3436
```
3537

3638
By default, the label will be placed on the **right** if the checkbox, however you can have it placed on the left side instead by setting the `labelLeft` attribute

docs/inputs/date-picker.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ component JavaScript.
131131
```html
132132
<x-date-picker name="birthday">
133133
<x-slot:config>
134-
onChange: (selectedDates, dateStr, instance) => { // ... }
134+
onChange: (selectedDates, dateStr, instance) => {
135+
// ...
136+
}
135137
</x-slot:config>
136138
</x-date-picker>
137139
```
@@ -149,8 +151,11 @@ the event.
149151
```html
150152
<x-date-picker name="birthday">
151153
<x-slot:config>
152-
onOpen: [ function (selectedDates, dateStr, instance) { // do something
153-
}, ],
154+
onOpen: [
155+
function (selectedDates, dateStr, instance) {
156+
// do something
157+
},
158+
],
154159
</x-slot:config>
155160
</x-date-picker>
156161
```

docs/inputs/switch-toggle.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ This will render a label containing the text "Notifications on" to the right sid
4242
to render the label as well:
4343

4444
```html
45-
<x-switch-toggle> Notifications on </x-switch-toggle>
45+
<x-switch-toggle>
46+
Notifications on
47+
</x-switch-toggle>
4648
```
4749

4850
### Left aligned labels

0 commit comments

Comments
 (0)