Skip to content

Commit

Permalink
added type check action
Browse files Browse the repository at this point in the history
squash
  • Loading branch information
DerekAgility committed Nov 8, 2024
1 parent 4f09f77 commit f9268d8
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 34 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Type Check

on:
push:
branches:
- main # Run type checking on pushes to the main branch
pull_request:
branches:
- main # Run type checking on pull requests to the main branch

jobs:
type-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3 # Checks out the repository code

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18" # Specify the Node.js version you want

- name: Install dependencies
run: yarn install # Or `npm install` if you're using npm

- name: Run TypeScript type check
run: npx tsc --noEmit --skipLibCheck
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react"
import NestedInputButton, { INestedInputButtonProps } from "./NestedInputButton"
import type { Meta, StoryObj } from "@storybook/react";
import NestedInputButton, { INestedInputButtonProps } from "./NestedInputButton";

const meta: Meta<typeof NestedInputButton> = {
title: "Design System/molecules/inputs/Nested Input Button",
Expand All @@ -12,10 +12,10 @@ const meta: Meta<typeof NestedInputButton> = {
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=114-2290&mode=dev&device-scaling=100%25&page-id=0%3A1"
}
}
}
};

export default meta
type Story = StoryObj<typeof NestedInputButton>
export default meta;
type Story = StoryObj<typeof NestedInputButton>;

export const RightAligned: Story = {
args: {
Expand All @@ -25,28 +25,24 @@ export const RightAligned: Story = {
},
ctaLabel: "Search",
align: "right",
isClear: false,
onClickHandler: () => window.alert("Clicked"),
buttonProps: {
type: "button"
}
isClear: false
}
}
};
export const LeftAligned: Story = {
args: {
...RightAligned.args,
align: "left"
}
}
};
export const IsClear: Story = {
args: {
...RightAligned.args,
isClear: true
}
}
};
export const NoIcon: Story = {
args: {
...RightAligned.args,
icon: undefined
}
}
};
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import type { Meta, StoryObj } from "@storybook/react"
import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "./AnimatedLabelTextArea"
import type { Meta, StoryObj } from "@storybook/react";
import AnimatedLabelTextArea, { IAnimatedLabelTextAreaProps } from "./AnimatedLabelTextArea";

const meta: Meta<typeof AnimatedLabelTextArea> = {
title: "Design System/organisms/Animated Label Text Area",
component: AnimatedLabelTextArea,
tags: ["autodocs"],
argTypes: {}
}
};

export default meta
type Story = StoryObj<typeof AnimatedLabelTextArea>
export default meta;
type Story = StoryObj<typeof AnimatedLabelTextArea>;
export const DefaultAnimatedLabelTextAreasStory: Story = {
args: {
id: "test",
label: "Label"
message: "Label"
} as IAnimatedLabelTextAreaProps
}
};

export const DefaultAnimatedLabelTextAreasStoryWithPlaceholder: Story = {
args: {
id: "test",
label: "Label",
message: "Label",
placeholder: "Placeholder"
} as IAnimatedLabelTextAreaProps
}
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react"
import FormInputWithAddons, { IFormInputWithAddonsProps } from "./FormInputWithAddons"
import type { Meta, StoryObj } from "@storybook/react";
import FormInputWithAddons, { IFormInputWithAddonsProps } from "./FormInputWithAddons";

const meta: Meta<typeof FormInputWithAddons> = {
title: "Design System/organisms/Form Input With Addons",
Expand All @@ -12,10 +12,10 @@ const meta: Meta<typeof FormInputWithAddons> = {
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=85-1269&mode=design"
}
}
}
};

export default meta
type Story = StoryObj<typeof FormInputWithAddons>
export default meta;
type Story = StoryObj<typeof FormInputWithAddons>;

export const DefaultFormInputWithAddons: Story = {
args: {
Expand All @@ -26,7 +26,7 @@ export const DefaultFormInputWithAddons: Story = {
labelClass: "text-gray-900",
trailIcon: { icon: "IconSearch" }
}
}
};
export const FormInputWithAddonBTN: Story = {
args: {
id: "appSearch",
Expand All @@ -39,10 +39,7 @@ export const FormInputWithAddonBTN: Story = {
className: "h-5 w-5 text-gray-400"
},
ctaLabel: "Edit",
align: "right",
onClickHandler: () => {
alert("Button Clicked")
}
align: "right"
}
}
}
};

0 comments on commit f9268d8

Please sign in to comment.