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
I want to display this component in Storybook, but since the $errors variable is undefined.
I tried to override the has() method explicitly by using storybook or php directive, but you received an error message and could not achieve your goal.
@storybook([
'args' => [
'errors' => (object) [
'has' => function () {
return true;
}
]
]
])
<x-input :errors="$errors" placeholder="Enter text here"></x-input>
// error message -> Call to a member function has() on array
@php
$errors = (object) [
'has' => function () {
return true;
},
];
@endphp
<x-input :errors="$errors" placeholder="Enter text here"></x-input>
// error message -> Call to undefined method stdClass::has()
Is there a way to display this component in Story?
The text was updated successfully, but these errors were encountered:
Hi!
Please excuse my poor English.
Thank you for the great library.
Let me ask a question as there does not seem to be the same issue in the past.
Environment
My environment is:
M1 Macbook Air
macOS 12.2.1
Blast v1.8
Description
I have a component that changes its style when an error occurs, like this:
I want to display this component in Storybook, but since the $errors variable is undefined.
I tried to override the has() method explicitly by using storybook or php directive, but you received an error message and could not achieve your goal.
Is there a way to display this component in Story?
The text was updated successfully, but these errors were encountered: