Skip to content

Commit e4ec2a5

Browse files
committed
Document required props for EDGE components
1 parent 2761f87 commit e4ec2a5

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

resources/views/docs/mobile/2/edge-components/bottom-nav.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ A bottom navigation bar with up to 5 items. Used for your app's primary navigati
4545

4646
A `<native:bottom-nav>` can contain up to 5 `<native:bottom-nav-item>` elements.
4747

48-
- `id` - Unique identifier
49-
- `icon` - A named [icon](icons)
50-
- `label` - Accessibility label (optional)
51-
- `url` - A URL to navigate to in the web view (optional)
48+
- `id` - Unique identifier (required)
49+
- `icon` - A named [icon](icons) (required)
50+
- `label` - Accessibility label (required)
51+
- `url` - A URL to navigate to in the web view (required)
5252
- `active` - Highlight this item as active (optional, default: `false`)
5353
- `badge` - Badge text/number (optional)
5454
- `news` - Show "new" indicator dot (optional, default: `false`)

resources/views/docs/mobile/2/edge-components/introduction.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ They can be defined in any Blade file, but for them to be processed, that Blade
7474
recommend putting your components in a Blade component that is likely to be rendered on every request, such as your
7575
main layout, e.g. `layouts/app.blade.php` or one of its child views/components.
7676

77+
## Props Validation
78+
79+
EDGE components enforce required props validation to prevent misconfiguration. If you're missing required props, you'll
80+
see a clear error message that tells you exactly what's missing and how to fix it.
81+
82+
For example, if you forget the `label` prop on a bottom navigation item:
83+
84+
```
85+
EDGE Component <native:bottom-nav-item> is missing required properties: 'label'.
86+
Add these attributes to your component: label="..."
87+
```
88+
89+
The error message will list all missing required props and show you exactly which attributes you need to add. This
90+
validation happens at render time, making it easy to catch configuration issues during development.
91+
92+
Each component's documentation page indicates which props are required vs optional.
93+
7794
## Using Inertia?
7895

7996
Each link in an EDGE component will do a full post back to PHP, which may not be what you want if you are using Inertia. To transform these requests into Inertia `<Link>`, add `router` to your `window` object:

resources/views/docs/mobile/2/edge-components/side-nav.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ On iOS, gesture support is always enabled for the side nav.
8484

8585
### `<native:side-nav-item>`
8686

87-
- `id` - Unique identifier
88-
- `label` - Display text
89-
- `icon` - A named [icon](icons)
90-
- `url` - A URL to navigate to in the web view (optional)
87+
- `id` - Unique identifier (required)
88+
- `label` - Display text (required)
89+
- `icon` - A named [icon](icons) (required)
90+
- `url` - A URL to navigate to in the web view (required)
9191
- `active` - Highlight this item as active (optional, default: `false`)
9292
- `badge` - Badge text (optional)
9393
- `badge-color` - Hex code or named color (optional)
@@ -100,7 +100,7 @@ Any `url` that doesn't match the web view's domain will open in the user's defau
100100

101101
### `<native:side-nav-group>`
102102

103-
- `heading` - The group's heading
103+
- `heading` - The group's heading (required)
104104
- `expanded` - Initially expanded (optional, default: `false`)
105105
- `icon` - Material icon (optional)
106106

resources/views/docs/mobile/2/edge-components/top-bar.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ A top bar with title and action buttons. This renders at the top of the screen.
3535

3636
## Props
3737

38-
- `title` - The title text
38+
- `title` - The title text (required)
3939
- `show-navigation-icon` - Show back/menu button (optional, default: `true`)
40-
- `label` - If more than 5 actions, iOS will display an overflow menu and the labels assigned to each item
40+
- `label` - If more than 5 actions, iOS will display an overflow menu and the labels assigned to each item (optional)
4141
- `background-color` - Background color. Hex code (optional)
4242
- `text-color` - Text color. Hex code (optional)
4343
- `elevation` - Shadow depth 0-24 (optional) [Android]
@@ -48,8 +48,8 @@ A `<native:top-bar>` can contain up to 10 `<native:top-bar-action>` elements. Th
4848
collapsing to a menu if there are too many.
4949

5050
### Props
51-
- `id` - Unique identifier
52-
- `icon` - A named [icon](icons)
51+
- `id` - Unique identifier (required)
52+
- `icon` - A named [icon](icons) (required)
5353
- `label` - Accessibility label (optional)
5454
- `url` - A URL to navigate to in the web view (optional)
5555

0 commit comments

Comments
 (0)