nixos-configs/modules/ags/gtk4/widget/subclasses/popover.ts

20 lines
553 B
TypeScript
Raw Normal View History

2025-01-01 13:38:44 -05:00
import { register } from 'astal';
import { Gtk } from 'astal/gtk4';
2025-01-01 13:38:44 -05:00
import astalify, { type AstalifyProps, type ConstructProps } from '../astalify';
2025-01-01 13:38:44 -05:00
export type PopoverProps = ConstructProps<
2025-01-13 10:51:02 -05:00
PopoverClass,
Gtk.Popover.ConstructorProps & AstalifyProps
2025-01-01 13:38:44 -05:00
>;
@register({ GTypeName: 'Popover' })
2025-01-13 10:51:02 -05:00
export class PopoverClass extends astalify(Gtk.Popover) {
constructor({ cssName = 'popover', ...props }: PopoverProps = {}) {
super({ cssName, ...props });
2025-01-13 10:51:02 -05:00
}
2025-01-01 13:38:44 -05:00
}
2025-01-13 10:51:02 -05:00
export const Popover = (props?: PopoverProps) => new PopoverClass(props);