From 75e54ed8f66be53d3c1eb96874bb9bf45e7cfbf9 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Thu, 15 Feb 2024 15:10:55 +0100 Subject: [PATCH 1/3] Add Glint support to the `AuToolbar` component --- .../{au-toolbar.gjs => au-toolbar.gts} | 26 +++++++++++++++++-- addon/template-registry.ts | 2 ++ ...au-toolbar-test.js => au-toolbar-test.gts} | 20 +++++++------- .../integration/components/loose-mode-test.ts | 7 +++++ 4 files changed, 43 insertions(+), 12 deletions(-) rename addon/components/{au-toolbar.gjs => au-toolbar.gts} (67%) rename tests/integration/components/{au-toolbar-test.js => au-toolbar-test.gts} (60%) diff --git a/addon/components/au-toolbar.gjs b/addon/components/au-toolbar.gts similarity index 67% rename from addon/components/au-toolbar.gjs rename to addon/components/au-toolbar.gts index cb6bd588e..5e4e2b976 100644 --- a/addon/components/au-toolbar.gjs +++ b/addon/components/au-toolbar.gts @@ -1,6 +1,21 @@ +import type { TOC } from '@ember/component/template-only'; import Component from '@glimmer/component'; -export default class AuToolbar extends Component { +export interface AuToolbarSignature { + Args: { + reverse?: boolean; + border?: 'top' | 'bottom'; + skin?: 'tint'; + size?: 'small' | 'medium' | 'large'; + nowrap?: boolean; + }; + Blocks: { + default: [typeof Group]; + }; + Element: HTMLDivElement; +} + +export default class AuToolbar extends Component { get reverse() { if (this.args.reverse) return 'au-c-toolbar--reverse'; else return ''; @@ -44,7 +59,14 @@ export default class AuToolbar extends Component { } -const Group =