@twintag/twintag-form 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,9 @@ const File = ({ useForm, label, bind, options }: Props) => {
63
63
  );
64
64
  })
65
65
  ) : (
66
- <span>Select a file</span>
66
+ <span className='block max-w-full overflow-hidden text-ellipsis whitespace-nowrap'>
67
+ {options?.placeholder || 'No file selected'}
68
+ </span>
67
69
  )}
68
70
  </span>
69
71
 
@@ -28,7 +28,7 @@ const Simple = ({ useForm, label, bind, options }: Props) => {
28
28
  <input
29
29
  id={id}
30
30
  type='text'
31
- placeholder='Write here...'
31
+ placeholder={options?.placeholder || 'Write here...'}
32
32
  className={input()}
33
33
  {...useForm!.register(bind as string, {
34
34
  required: options?.optionalField ? false : `${label} is required`,
@@ -24,7 +24,7 @@ const Textarea = ({ useForm, label, bind, options }: Props) => {
24
24
  <textarea
25
25
  id={id}
26
26
  className={input()}
27
- placeholder='Write here...'
27
+ placeholder={options?.placeholder || 'Write here...'}
28
28
  {...useForm!.register(bind as string, {
29
29
  required: options?.optionalField ? false : `${label} is required`,
30
30
  })}
@@ -11,6 +11,7 @@ export type CommonProps<TVariant> = {
11
11
  checked?: boolean;
12
12
  options?: {
13
13
  variant?: TVariant;
14
+ placeholder?: string;
14
15
  optionalField?: boolean;
15
16
  };
16
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twintag/twintag-form",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Twintag",
5
5
  "type": "module",
6
6
  "exports": {
@@ -40,8 +40,8 @@
40
40
  "typescript": "^5.0.2",
41
41
  "vite": "^4.1.0",
42
42
  "vite-plugin-dts": "^2.1.0",
43
- "tsconfig": "0.0.0",
44
43
  "tailwind-config": "0.0.0",
44
+ "tsconfig": "0.0.0",
45
45
  "twintag-types": "0.0.0"
46
46
  },
47
47
  "publishConfig": {