Skip to content

Commit

Permalink
feat: add experimental icon component
Browse files Browse the repository at this point in the history
  • Loading branch information
jviide committed Apr 29, 2024
1 parent 649b88a commit 983893e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-berries-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@badrap/libapp": patch
---

Add experimental icon component
12 changes: 12 additions & 0 deletions src/ui/experimental/Icon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Responsive, UiNode, element } from "../internal.js";

type IconProps = {
name: string;
filled?: boolean;
size?: Responsive<"xs" | "sm" | "md">;
color?: "base" | "gray" | "orange" | "red" | "green" | "blue";
};

export function Icon(props: IconProps): UiNode {
return element("ui-icon", props);
}
1 change: 1 addition & 0 deletions src/ui/experimental/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { DownloadButton } from "./DownloadButton.js";
export { Flex } from "./Flex.js";
export { Form } from "./Form.js";
export { HiddenInput } from "./HiddenInput.js";
export { Icon } from "./Icon.js";
export { Link } from "./Link.js";
export { List } from "./List.js";
export { Redirect } from "./Redirect.js";
Expand Down

0 comments on commit 983893e

Please sign in to comment.