2025-01-01 13:38:44 -05:00
|
|
|
import { register } from 'astal';
|
2025-01-15 18:17:27 -05:00
|
|
|
import { Gtk } from 'astal/gtk4';
|
2025-01-01 13:38:44 -05:00
|
|
|
|
2025-01-15 18:17:27 -05:00
|
|
|
import astalify, { type AstalifyProps, type ConstructProps } from '../astalify';
|
2025-01-01 13:38:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
export type LabelProps = ConstructProps<
|
2025-01-13 10:51:02 -05:00
|
|
|
LabelClass,
|
|
|
|
Gtk.Label.ConstructorProps & AstalifyProps
|
2025-01-01 13:38:44 -05:00
|
|
|
>;
|
|
|
|
|
|
|
|
@register({ GTypeName: 'Label' })
|
2025-01-13 10:51:02 -05:00
|
|
|
export class LabelClass extends astalify(Gtk.Label) {
|
|
|
|
constructor({ cssName = 'label', ...props }: LabelProps = {}) {
|
2025-01-14 00:09:11 -05:00
|
|
|
super({ cssName, ...props });
|
2025-01-13 10:51:02 -05:00
|
|
|
}
|
2025-01-01 13:38:44 -05:00
|
|
|
|
|
|
|
getChildren() { return []; }
|
|
|
|
}
|
2025-01-13 10:51:02 -05:00
|
|
|
|
|
|
|
export const Label = (props?: LabelProps) => new LabelClass(props);
|