Skip to content

Commit

Permalink
Merge pull request #484 from 18alantom/exports
Browse files Browse the repository at this point in the history
feat: Exports
  • Loading branch information
18alantom authored Oct 17, 2022
2 parents 2efc290 + 795df3e commit 465ca08
Show file tree
Hide file tree
Showing 15 changed files with 732 additions and 146 deletions.
4 changes: 2 additions & 2 deletions fyo/utils/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '../../utils/translationHelpers';
import { ValueError } from './errors';

type TranslationArgs = boolean | number | string;
type TranslationLiteral = TemplateStringsArray | TranslationArgs;
export type TranslationArgs = boolean | number | string;
export type TranslationLiteral = TemplateStringsArray | TranslationArgs;

class TranslationString {
args: TranslationLiteral[];
Expand Down
24 changes: 17 additions & 7 deletions src/components/Controls/Check.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<template>
<div :class="[inputClasses, containerClasses]">
<label class="flex items-center">
<div class="mr-3 text-gray-600 text-sm" v-if="showLabel && !labelRight">
<label
class="flex items-center"
:class="spaceBetween ? 'justify-between' : ''"
>
<div class="mr-3" :class="labelClasses" v-if="showLabel && !labelRight">
{{ df.label }}
</div>
<div
Expand Down Expand Up @@ -63,7 +66,7 @@
@focus="(e) => $emit('focus', e)"
/>
</div>
<div class="ml-3 text-gray-600 text-sm" v-if="showLabel && labelRight">
<div class="ml-3" :class="labelClasses" v-if="showLabel && labelRight">
{{ df.label }}
</div>
</label>
Expand All @@ -77,10 +80,15 @@ export default {
extends: Base,
emits: ['focus'],
props: {
spaceBetween: {
default: false,
type: Boolean,
},
labelRight: {
default: true,
type: Boolean,
},
labelClass: String,
},
data() {
return {
Expand All @@ -90,11 +98,13 @@ export default {
};
},
computed: {
/*
inputClasses() {
return this.getInputClassesFromProp([]);
labelClasses() {
if (this.labelClass) {
return this.labelClass;
}
return 'text-gray-600 text-sm';
},
*/
checked() {
return this.value;
},
Expand Down
Loading

0 comments on commit 465ca08

Please sign in to comment.