Skip to content

Commit

Permalink
avoid adding new stuff to fields for now. just plop in some css.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Nov 28, 2023
1 parent 9fc72fe commit cf2f7e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
10 changes: 1 addition & 9 deletions resources/js/components/publish/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>
<div slot-scope="{ meta, value, loading: loadingMeta }" :class="classes">
<div class="field-inner">
<label v-if="showLabel" class="publish-field-label" :class="labelClasses" :for="fieldId">
<label v-if="showLabel" class="publish-field-label" :class="{'font-bold': config.bold}" :for="fieldId">
<span
v-if="showLabelText"
class="mr-1"
Expand Down Expand Up @@ -156,19 +156,11 @@ export default {
this.isReadOnly ? 'read-only-field' : '',
this.isInsideConfigFields ? 'config-field' : `${tailwind_width_class(this.config.width)}`,
this.config.classes || '',
this.config.field_classes || '',
this.config.full_width_setting ? 'full-width-setting' : '',
{ 'has-error': this.hasError || this.hasNestedError }
];
},
labelClasses() {
return [
this.config.bold ? 'font-bold' : '',
this.config.label_classes || '',
];
},
fieldId() {
return 'field_'+this.config.handle;
},
Expand Down
14 changes: 8 additions & 6 deletions resources/js/components/users/Wizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div slot-scope="{ setFieldValue, setFieldMeta }">
<div class="-mx-6">
<publish-fields
:fields="publishFields"
:fields="fields"
@updated="setFieldValue"
@meta-updated="setFieldMeta"
/>
Expand Down Expand Up @@ -173,6 +173,13 @@
</div>
</template>

<style>
.publish-fields .form-group .field-inner > label {
@apply text-base font-bold mb-1;
& + .help-block { @apply -mt-1 !important; }
}
</style>

<script>
// Yer a wizard Harry
Expand Down Expand Up @@ -245,11 +252,6 @@ export default {
},
finishButtonText() {
return this.invitation.send ? __('Create and Send Email') : __('Create User');
},
publishFields() {
return this.fields.map((field) => {
return {...field, field_classes: 'pb-4', bold: true, label_classes: 'text-base mb-1'};
});
}
},
Expand Down

0 comments on commit cf2f7e6

Please sign in to comment.