Skip to content

Commit

Permalink
Merge pull request #19 from daleal/master
Browse files Browse the repository at this point in the history
Release 0.3.1
  • Loading branch information
daleal authored Jul 9, 2022
2 parents 0cceed3 + 6aa5591 commit 6721667
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "loveform",
"version": "0.3.0",
"version": "0.3.1",
"description": "The Vue form assembly tool that won't break your heart 💔",
"homepage": "https://loveform.daleal.dev",
"repository": "https://github.com/daleal/loveform",
Expand Down
3 changes: 2 additions & 1 deletion src/components/LCheckbox/LCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export const LCheckbox = defineComponent({
<>
<input
value={content.value}
onInput={onInput}
class="l-checkbox"
type="checkbox"
onInput={onInput}
{ ...attrs }
/>
</>
Expand Down
9 changes: 5 additions & 4 deletions src/components/LCheckboxGroup/LCheckboxGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ export const LCheckboxGroup = defineComponent({

useRender(() => (
<>
<>
{ slots.default?.() }
</>
{ validation.renderError.value && <p>{ validation.error.value }</p> }
{ slots.default?.() }
{
validation.renderError.value
&& <p class="l-checkbox-group__error">{ validation.error.value }</p>
}
</>
));

Expand Down
1 change: 1 addition & 0 deletions src/components/LForm/LForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const LForm = defineComponent({

useRender(() => (
<form
class="l-form"
onSubmit={onSubmit}
{ ...attrs }
>
Expand Down
8 changes: 6 additions & 2 deletions src/components/LInput/LInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ export const LInput = defineComponent({
<>
<input
value={content.value}
class="l-input"
type="text"
onInput={onInput}
onBlur={validation.startValidating}
type="text"
{ ...attrs }
/>
{ validation.renderError.value && <p>{ validation.error.value }</p> }
{
validation.renderError.value
&& <p class="l-input__error">{ validation.error.value }</p>
}
</>
));

Expand Down
6 changes: 5 additions & 1 deletion src/components/LTextarea/LTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ export const LTextarea = defineComponent({
<>
<textarea
value={content.value}
class="l-textarea"
onInput={onInput}
onBlur={validation.startValidating}
{ ...attrs }
/>
{ validation.renderError.value && <p>{ validation.error.value }</p> }
{
validation.renderError.value
&& <p class="l-textarea__error">{ validation.error.value }</p>
}
</>
));

Expand Down

0 comments on commit 6721667

Please sign in to comment.