Skip to content

Commit

Permalink
fix: textarea props
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed Nov 27, 2024
1 parent cbe50e3 commit a241182
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
4 changes: 2 additions & 2 deletions apps/desktop/src/lib/vbranches/upstreamIntegrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type NameAndBranchStatus = {

export type BranchStatus =
| {
type: 'empty' | 'integrated' | 'safelyUpdatable';
type: 'empty' | 'integrated' | 'saflyUpdatable';
}
| {
type: 'conflicted';
Expand All @@ -34,7 +34,7 @@ export function stackFullyIntegrated(stackStatus: StackStatus): boolean {
}

export type TreeStatus = {
type: 'empty' | 'conflicted' | 'safelyUpdatable';
type: 'empty' | 'conflicted' | 'saflyUpdatable';
};

export type StackStatusInfo = { stack: VirtualBranch; status: StackStatus };
Expand Down
20 changes: 2 additions & 18 deletions packages/ui/src/lib/Textarea.svelte
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<script lang="ts" module>
export interface Props {
id?: string;
export interface Props extends HTMLTextareaAttributes {
textBoxEl?: HTMLTextAreaElement;
label?: string;
value?: string;
placeholder?: string;
disabled?: boolean;
fontWeight?: 'regular' | 'bold' | 'semibold';
fontSize?: number;
minRows?: number;
maxRows?: number;
autofocus?: boolean;
spellcheck?: boolean;
autocomplete?: string;
class?: string;
flex?: string;
padding?: {
Expand All @@ -27,22 +21,12 @@
borderBottom?: boolean;
borderLeft?: boolean;
unstyled?: boolean;
oninput?: (e: Event & { currentTarget: EventTarget & HTMLTextAreaElement }) => void;
onchange?: (e: Event & { currentTarget: EventTarget & HTMLTextAreaElement }) => void;
onfocus?: (
this: void,
e: FocusEvent & { currentTarget: EventTarget & HTMLTextAreaElement }
) => void;
onblur?: (
this: void,
e: FocusEvent & { currentTarget: EventTarget & HTMLTextAreaElement }
) => void;
onkeydown?: (e: KeyboardEvent & { currentTarget: EventTarget & HTMLTextAreaElement }) => void;
}
</script>

<script lang="ts">
import { pxToRem } from '$lib/utils/pxToRem';
import type { HTMLTextareaAttributes } from 'svelte/elements';
let {
id,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/stories/textarea/textareaDemo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
changableValue = `## ☕️ Reasoning ## 🧢 Chang sdf sdf sdfsdf sdfsfsd ## 📌 Todos`;
}
function handleDescriptionKeyDown(e: KeyboardEvent & { currentTarget: HTMLTextAreaElement }) {
function handleDescriptionKeyDown(e: KeyboardEvent) {
if (e.key === 'Escape') {
console.log('keyboard', e.key);
e.preventDefault();
Expand Down

0 comments on commit a241182

Please sign in to comment.