Skip to content

Commit

Permalink
Expand HDS template types (#385)
Browse files Browse the repository at this point in the history
* Tweak HDS types

* Remove number type
  • Loading branch information
jeffdaley authored Oct 27, 2023
1 parent 3423f31 commit f5d44b1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion web/types/hds/badge-count.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//helios.hashicorp.design/components/badge-count?tab=code#component-api
// helios.hashicorp.design/components/badge-count?tab=code#component-api

import { ComponentLike } from "@glint/template";
import { HdsBadgeCountColor, HdsBadgeType } from "hds/_shared";
Expand Down
6 changes: 1 addition & 5 deletions web/types/hds/badge.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
// https://helios.hashicorp.design/components/badge?tab=code#component-api

import { ComponentLike } from "@glint/template";
import {
HdsBadgeColor,
HdsBadgeType,
HdsComponentSize,
} from "hds/_shared";
import { HdsBadgeColor, HdsBadgeType, HdsComponentSize } from "hds/_shared";

interface HdsBadgeComponentSignature {
Element: HTMLDivElement;
Expand Down
28 changes: 17 additions & 11 deletions web/types/hds/flight-icon.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
// https://helios.hashicorp.design/icons/usage-guidelines?tab=code
declare module "@hashicorp/ember-flight-icons/components/flight-icon" {
import Component from "@glimmer/component";
import { ComponentLike } from "@glint/template";

import { ComponentLike } from "@glint/template";
// https://helios.hashicorp.design/icons/usage-guidelines?tab=code

export type FlightIconComponent = ComponentLike<{
Element: SVGElement;
Args: {
name: string;
size?: "16" | "24";
color?: string;
stretched?: boolean;
};
}>;
interface FlightIconComponentSignature {
Element: SVGElement;
Args: {
name: string;
size?: "16" | "24";
color?: string;
stretched?: boolean;
};
}

export type FlightIconComponent = ComponentLike<FlightIconComponentSignature>;
export default class FlightIcon extends Component<FlightIconComponentSignature> {}
}

0 comments on commit f5d44b1

Please sign in to comment.