From 58fa1ab9be7ee8fd4a8e96865121a54d613978cc Mon Sep 17 00:00:00 2001 From: Aylur Date: Sat, 25 May 2024 14:44:50 +0200 Subject: separate node and gjs into its own package --- node/src/widgets.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 node/src/widgets.ts (limited to 'node/src/widgets.ts') diff --git a/node/src/widgets.ts b/node/src/widgets.ts new file mode 100644 index 0000000..300cfab --- /dev/null +++ b/node/src/widgets.ts @@ -0,0 +1,37 @@ +/* eslint-disable max-len */ +import { Astal, Gtk } from "./imports.js" +import astalify, { type ConstructProps, type Widget } from "./astalify.js" +import type GtkT from "@girs/node-gtk-3.0/node-gtk-3.0" +import type AstalT from "@girs/node-astal-0.1/node-astal-0.1" + +export { astalify } + +// Label +export const Label = astalify(Gtk.Label) +export type LabelProps = ConstructProps + +// Icon +export const Icon = astalify(Astal.Icon) +export type IconProps = ConstructProps + +// Button +export const Button = astalify(Astal.Button) +export type ButtonProps = ConstructProps) => void +}> + +// Window +export const Window = astalify(Astal.Window) +export type WindowProps = ConstructProps + +// Box +export const Box = astalify(Astal.Box) +export type BoxProps = ConstructProps + +// CenterBox +export const CenterBox = astalify(Astal.CenterBox) +export type CenterBoxProps = ConstructProps + +// EventBox +export const EventBox = astalify(Astal.EventBox) +export type EventBoxProps = ConstructProps -- cgit v1.2.3