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

21 lines
641 B
TypeScript
Raw Normal View History

2025-01-01 13:38:44 -05:00
import { register } from 'astal';
import { Gtk, type ConstructProps } from 'astal/gtk4';
2025-01-13 10:51:02 -05:00
import astalify, { type AstalifyProps } from './astalify';
2025-01-01 13:38:44 -05:00
export type RevealerProps = ConstructProps<
2025-01-13 10:51:02 -05:00
RevealerClass,
Gtk.Revealer.ConstructorProps & AstalifyProps
2025-01-01 13:38:44 -05:00
>;
@register({ GTypeName: 'Revealer' })
2025-01-13 10:51:02 -05:00
export class RevealerClass extends astalify(Gtk.Revealer) {
constructor({ cssName = 'revealer', ...props }: RevealerProps = {}) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
super({ cssName, ...props as any });
}
2025-01-01 13:38:44 -05:00
}
2025-01-13 10:51:02 -05:00
export const Revealer = (props?: RevealerProps) => new RevealerClass(props);