You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: avatar.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `avatar` component comes ready out-of-the-box with Blade UI Kit. Simply [ins
8
8
9
9
## Basic Usage
10
10
11
-
The most basic usage of the `avatar` component exists in using it as a self-closing component. Search for an identifier like a username, email or domain:
11
+
The most basic usage of the `avatar` component is as a self-closing component. Search for an identifier like a username, email or domain:
12
12
13
13
```html
14
14
<x-avatarsearch="johndoe" />
@@ -40,7 +40,7 @@ And this will force unavatar to search only Gravatar images.
40
40
41
41
## Fallbacks
42
42
43
-
If you'd like to provide a fallback image when not matches were found for a given search result you can use the `fallback` attribute:
43
+
If you'd like to provide a fallback image when no matche is found for a given search result, you can use the `fallback` attribute:
Copy file name to clipboardexpand all lines: carbon.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -79,9 +79,9 @@ This uses Alpine to determine in which timezone the user is browsing.
79
79
80
80
> Please note that you cannot combine `human` and `local` at the same time.
81
81
82
-
### Formatting Local
82
+
### Formatting with Local
83
83
84
-
Formatting for with the `local` boolean attribute works a little different. You can still use the `format` attribute but instead of using [PHP's date formatting](https://www.php.net/manual/en/datetime.format.php) you'll need to use [Moment.js' date formatting options](https://momentjs.com/docs/#/displaying/format/).
84
+
Formatting when using with the `local` boolean attribute works a little differently. You can still use the `format` attribute but instead of using [PHP's date formatting](https://www.php.net/manual/en/datetime.format.php) you'll need to use [Moment.js' date formatting options](https://momentjs.com/docs/#/displaying/format/).
Copy file name to clipboardexpand all lines: checkbox.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `checkbox` component comes ready out-of-the-box with Blade UI Kit. Simply [i
8
8
9
9
## Basic Usage
10
10
11
-
The most basic usage of the component exists in setting a`name` attribute:
11
+
The most basic usage of the component is to set the`name` attribute:
12
12
13
13
```html
14
14
<x-checkboxname="remember_me"/>
@@ -22,7 +22,7 @@ This will output the following HTML:
22
22
23
23
### Old Values
24
24
25
-
The `checkbox` component also supports checked values that were set. For example, you might want to apply some validation in the backend and make sure the user doesn't loses their input data when you show them the form anew with the validation errors. When re-rendering the form, the `checkbox` component will remember the checked value:
25
+
The `checkbox` component also supports checked values that were set. For example, you might want to apply some validation in the backend, but also make sure the user doesn't lose their input data when you re-render the form with any validation errors. When re-rendering the form, the `checkbox` component will remember the checked value:
Copy file name to clipboardexpand all lines: color-picker.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ While the `color-picker` component works out-of-the-box when you've [set the dir
11
11
12
12
## Basic Usage
13
13
14
-
The most basic usage of the component exists in setting a `name` attribute:
14
+
The most basic usage of the component is to set a `name` attribute:
15
15
16
16
```html
17
17
<x-color-pickername="color" />
@@ -30,7 +30,7 @@ The `<div id="color"></div>` is used by Pickr to render the color picker. What's
30
30
31
31
### Old Values
32
32
33
-
The `color-picker` component also supports old values that were set. For example, you might want to apply some validation in the backend and make sure the user doesn't loses their input data when you show them the form anew with the validation errors. When re-rendering the form, the `color-picker` component will remember the old value:
33
+
The `color-picker` component also supports old values that were set. For example, you might want to apply some validation in the backend, but also make sure the user doesn't lose their input data when you re-render the form with any validation errors. When re-rendering the form, the `color-picker` component will remember the old value:
Copy file name to clipboardexpand all lines: contribution-guide.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,23 @@ Thank you for taking an interest in contributing to Blade UI Kit! We welcome pul
4
4
5
5
## Requesting Components
6
6
7
-
We very much welcome requests for new components. But before doing so please make sure to search [the issue tracker](https://github.com/blade-ui-kit/blade-ui-kit/issues) to see if your component was requested before. A similar issue request might be open already so make sure to upvote it so it gets more attention. We'll generally focus more on components that are higher upvoted.
7
+
We very much welcome requests for new components. But before doing so please make sure to search [the issue tracker](https://github.com/blade-ui-kit/blade-ui-kit/issues) to see if your component was requested before. A similar issue request might be open already so make sure to upvote it so it gets more attention. We'll generally focus more on components that are most upvoted.
8
8
9
9
When requesting a component make sure to thoroughly explain what you expect the component to do. Providing an example syntax of its usage helps a lot in understanding how it should be designed. As soon as you're ready, head over to the repo and [open an issue to request a component](https://github.com/blade-ui-kit/blade-ui-kit/issues/new/choose).
10
10
11
-
Your component, however might be rejected. This could be because we feel that it doesn't really belongs in the library or that we don't want to maintain it ourselves. In order to keep the library maintable we need to be critical to the amount of components we accept.
11
+
Your component, however might be rejected. This could be because we feel that it doesn't really belongs in the library or that we don't want to maintain it ourselves. In order to keep the library maintable we need to be critical to the number of components we accept.
12
12
13
13
## Building Components
14
14
15
15
If you want to build a component yourself, please make sure that you [request it first](#requesting-components) before building it. Otherwise you run the risk of it being rejected even though you've put in all the work already.
16
16
17
-
When building components there's some things you need to know. First of all, every component needs a view and a class. These need to be placed in the exact same directory structures. For example, the `input` component's class is placed in `resources/views/components/forms/inputs/input.blade.php` and its class is placed in `src/Components/Forms/Inputs/Input.php`. You also need to enable the component through the config file through the `components` config option. The components here are arranged alphabetically by their class name(space).
17
+
When building components there are some things you need to know. First of all, every component needs a view and a class. These need to be placed in the exact same directory structures. For example, the `input` component's class is placed in `resources/views/components/forms/inputs/input.blade.php` and its class is placed in `src/Components/Forms/Inputs/Input.php`. You also need to enable the component through the config file through the `components` config option. The components here are arranged alphabetically by their class name(space).
18
18
19
-
Components are also fully standalone. This meansyou cannot reference other components in their views etc. This is to prevent conflicts with other libraries, prefixing being broken or people not being able to overwrite components anymore.
19
+
Components are also fully standalone. This means, for instance, that you cannot reference other components inside component views. This is to prevent problems such as conflicts with other libraries, broken prefixes, or not being able to overwrite components anymore.
20
20
21
21
### Assets
22
22
23
-
When you're building a component which makes use of a library that needs some CDN CSS and/or JavaScript assets you can reference the library in the `blade-ui-kit.php` config's `assets` option. Afterwards, you can load the CDN assets through the component's reserved `$assets` property:
23
+
When you're building a component that uses some CDN CSS and/or JavaScript assets from a third-party library, you can reference the library in the `blade-ui-kit.php` config's `assets` option. Afterwards, you can load the CDN assets through the component's reserved `$assets` property:
24
24
25
25
```php
26
26
use BladeUIKit\Components\BladeComponent;
@@ -35,4 +35,4 @@ class MyComponent extends BladeComponent
35
35
36
36
## Writing Tests
37
37
38
-
When building components or contributing to the library we also encourage to write tests. Please [reference the existing test suite](https://github.com/blade-ui-kit/blade-ui-kit/tree/main/tests/Components) and create equivalent tests for new components or new component functionality.
38
+
When building components or contributing to the library, we also encourage you to write tests. Please [reference the existing test suite](https://github.com/blade-ui-kit/blade-ui-kit/tree/main/tests/Components) and create equivalent tests for new components or new component functionality.
Copy file name to clipboardexpand all lines: cron.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Cron
2
2
3
-
The `cron` component is a nice little convenience component that provides a way to make cron expressions human readable. I makes use of the [CRON Translator](https://github.com/lorisleiva/cron-translator) behind the hood.
3
+
The `cron` component is a nice little convenience component that provides a way to make cron expressions human readable. It makes use of the [CRON Translator](https://github.com/lorisleiva/cron-translator) behind the hood.
4
4
5
5
## Installation
6
6
@@ -44,4 +44,4 @@ This will output the following HTML:
44
44
</span>
45
45
```
46
46
47
-
As you can see we display the human readable value and show the cron expression when you hover over it.
47
+
As you can see, we display the human readable value and show the cron expression when you hover over it.
Or use the `--class` & `--view` flags as described below.
16
16
17
-
In general it's important to note that if you take this approach you need to **be sensible about the things you adjust**. You can't simple rename properties and methods and expect everything to still work. Write tests for your new components and don't wander too far from the defaults. **We also don't offer any guarantee that things will keep working in future (major) versions.**
17
+
In general it's important to note that if you take this approach you need to **be sensible about the things you adjust**. You can't simply rename properties and methods and expect everything to still work. Write tests for your new components and don't wander too far from the defaults. **We also don't offer any guarantee that things will keep working in future (major) versions.**
18
18
19
19
### Overwriting Classes
20
20
21
-
You can customize component's by overwriting their classes. To start off with publishing a component's class you can use the `buk:publish` command and the `--class` flag:
21
+
You can customize components by overwriting their classes. To start off with publishing a component's class you can use the `buk:publish` command and the `--class` flag:
22
22
23
23
```bash
24
24
php artisan buk:publish color-picker --class
@@ -46,4 +46,4 @@ Of course, if customizing isn't your thing, or even using the library as a depen
46
46
47
47
Also some credit if you copy code somewhere (prefereable in the readme of the repository) is always appreciated.
48
48
49
-
And advantage to this approach is that you're less prone to breakages from the library itself with newer versions coming out but you'll lose the nicety of getting bug fixes and new features.
49
+
An advantage to this approach is that you're less prone to breakages from the library itself with newer versions coming out, but you'll lose the nicety of getting bug fixes and new features.
Copy file name to clipboardexpand all lines: dropdown.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -42,4 +42,4 @@ This will output the following HTML:
42
42
43
43
As you can see, the Alpine.js toggles are applied the surrounding `div` elements. This saves you from having to re-apply these attributes all the time.
44
44
45
-
One nice use case for this are[the navbars from Tailwind UI](https://tailwindui.com/components/application-ui/navigation/navbars).
45
+
One nice use case for this is[the navbars from Tailwind UI](https://tailwindui.com/components/application-ui/navigation/navbars).
Copy file name to clipboardexpand all lines: easy-mde.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ This will output the following HTML *(inline JS has been omitted)*:
23
23
<textareaname="about"id="about"></textarea>
24
24
```
25
25
26
-
Which will render the Easy MDE editor.
26
+
From there, the Easy MDE editor will be rendered.
27
27
28
28
### Old Values
29
29
30
-
The `easy-mde` component also supports old values that were set. For example, you might want to apply some validation in the backend and make sure the user doesn't loses their input data when you show them the form anew with the validation errors. When re-rendering the form, the `easy-mde` component will remember the old value:
30
+
The `easy-mde` component also supports old values that were set. For example, you might want to apply some validation in the backend, but also make sure the user doesn't lose their input data when you re-render the form with any validation errors. When re-rendering the form, the `easy-mde` component will remember the old value:
Copy file name to clipboardexpand all lines: email.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `email` component comes ready out-of-the-box with Blade UI Kit. Simply [inst
8
8
9
9
## Basic Usage
10
10
11
-
The most basic usage of the component exists in referencing it:
11
+
The most basic usage of the component is to simply reference it:
12
12
13
13
```html
14
14
<x-email />
@@ -36,7 +36,7 @@ This will output the following HTML:
36
36
37
37
### Old Values
38
38
39
-
The `email` component also supports old values that were set. For example, you might want to apply some validation in the backend and make sure the user doesn't loses their input data when you show them the form anew with the validation errors. When re-rendering the form, the `email` component will remember the old value:
39
+
The `email` component also supports old values that were set. For example, you might want to apply some validation in the backend, but also make sure the user doesn't lose their input data when you re-render the form with any validation errors. When re-rendering the form, the `email` component will remember the old value:
Copy file name to clipboardexpand all lines: error.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Imagine we have the following validation errors:
14
14
['first_name' => 'Incorrect first name.']
15
15
```
16
16
17
-
The most basic usage of the `error` component exists in using it as a self-closing component with a `field` attribute:
17
+
The most basic usage of the `error` component is as a self-closing component with a `field` attribute:
18
18
19
19
```html
20
20
<x-errorfield="email"class="text-red-500" />
@@ -32,7 +32,7 @@ As you can see it'll pick the error message from the `$error` message bag and re
32
32
33
33
## Composing The Content
34
34
35
-
You can also opt to choose to composing how the rendered content look to. This allows you to make use of the components`messages()` method to render multiple validation errors at the same time.
35
+
You can also opt to customize the structure of the rendered content. This allows you to make use of the component's`messages()` method to, for example, render multiple validation errors at the same time.
36
36
37
37
Let's assume we have the following validation errors:
0 commit comments