Skip to content

Commit

Permalink
fix: TextField, Input exports (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherChudzicki authored Dec 16, 2024
1 parent c0008f4 commit cf70de7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { join, dirname } from "path"
import { StorybookConfig } from "@storybook/react-webpack5"
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string) {
return dirname(require.resolve(join(value, "package.json")))
}

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.tsx"],

Expand All @@ -18,10 +9,10 @@ const config: StorybookConfig = {
staticDirs: ["./public"],

addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-interactions"),
getAbsolutePath("@storybook/addon-webpack5-compiler-swc"),
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-webpack5-compiler-swc",
],

webpackFinal: async (config) => {
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ export type {
} from "./components/Button/ActionButton"

export type { LinkAdapterPropsOverrides } from "./components/LinkAdapter/LinkAdapter"

export { Input } from "./components/Input/Input"
export type { InputProps } from "./components/Input/Input"
export { TextField } from "./components/TextField/TextField"
export type { TextFieldProps } from "./components/TextField/TextField"

0 comments on commit cf70de7

Please sign in to comment.