Skip to content

Commit

Permalink
small tweaks to editable text, not happy yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter9192 committed Aug 20, 2024
1 parent 69f6390 commit b6e7475
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/class-solid/src/components/EditableText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ export function EditableText(props: {
type="text"
value={props.text}
class="mx-1 rounded border-2 bg-background p-1"
autofocus
onKeyDown={(e) => {
if (e.key === "Escape") {
setEditing(false);
}
}}
/>
<Button title="Save" type="submit" variant="ghost">
🖉
</Button>
</form>
</Show>
Expand Down

0 comments on commit b6e7475

Please sign in to comment.