Skip to content

Commit

Permalink
feat: applied feedback (types)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Dec 5, 2024
1 parent e1e3726 commit 0868599
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ declare namespace ReactPDF {
> {}

// see http://pdfkit.org/docs/forms.html#text_field_formatting
interface TextFieldFormatting {
interface TextInputFormatting {
type:
| 'date'
| 'time'
Expand All @@ -262,17 +262,17 @@ declare namespace ReactPDF {

// see http://pdfkit.org/docs/forms.html#text_field_formatting
interface TextInputProps extends FormCommonProps {
align?: string;
align?: 'left' | 'center' | 'right';
multiline?: boolean;
password?: boolean;
noSpell?: boolean;
format?: TextFieldFormatting;
format?: TextInputFormatting;
}

class TextInput extends React.Component<TextInputProps> {}

interface CheckboxProps extends FormCommonProps {
backGroundColor?: string;
backgroundColor?: string;
borderColor?: string;
checked?: boolean;
onState?: string;
Expand All @@ -282,14 +282,28 @@ declare namespace ReactPDF {

class Checkbox extends React.Component<CheckboxProps> {}

interface PickerAndListProps extends FormCommonProps {
interface PickerAndListPropsBase extends FormCommonProps {
sort?: boolean;
edit?: boolean;
multiSelect?: boolean;
noSpell?: boolean;
select?: string[];
}

type PickerAndListPropsWithEdit = PickerAndListPropsBase & {
edit: true | false;
noSpell: boolean;
};

type PickerAndListPropsWithNoSpell = PickerAndListPropsBase & {
edit: boolean;
noSpell: true | false;
};

type PickerAndListProps =
| PickerAndListPropsWithEdit
| PickerAndListPropsWithNoSpell;

class Picker extends React.Component<PickerAndListProps> {}

class FormList extends React.Component<PickerAndListProps> {}
Expand Down

0 comments on commit 0868599

Please sign in to comment.