nixos-configs/modules/ags/gtk4/widget/subclasses/entry.ts
matt1432 e7accbd7bd
All checks were successful
Discord / discord commits (push) Has been skipped
feat(ags4): write own ConstructProps to exclude props
2025-01-15 18:17:27 -05:00

26 lines
683 B
TypeScript

import { register } from 'astal';
import { Gtk } from 'astal/gtk4';
import astalify, { type AstalifyProps, type ConstructProps } from '../astalify';
type EntrySignals = Record<`on${string}`, unknown[]> & {
onActivate: []
onNotifyText: []
};
export type EntryProps = ConstructProps<
EntryClass,
Gtk.Entry.ConstructorProps & AstalifyProps,
EntrySignals
>;
@register({ GTypeName: 'Entry' })
export class EntryClass extends astalify(Gtk.Entry) {
constructor({ cssName = 'entry', ...props }: EntryProps = {}) {
super({ cssName, ...props });
}
getChildren() { return []; }
}
export const Entry = (props?: EntryProps) => new EntryClass(props);