Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/gsoft-inc/wl-hopper into fe…
Browse files Browse the repository at this point in the history
…at/HOP-99-switch
  • Loading branch information
vicky-comeau committed Apr 25, 2024
2 parents c23b6a1 + 0104024 commit 9a96242
Show file tree
Hide file tree
Showing 70 changed files with 1,842 additions and 459 deletions.
25 changes: 25 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,33 @@ const storybookConfig: StorybookConfig = {
})
].filter(Boolean);

// Modify the css-loader options to simplify the class names
// By default, with the config, the classnames are like this: GETEs8cGi4WwwvV1ooFy MUs8LC8twKwy5uAnhOWJ PafTkO4uwI6M3m4HX7JI
// With this new config, the classnames are like this: hop-Button___GETEs hop-Button--primary___MUs8L hop-Button--md___PafTk
for (const rule of config.module?.rules || []) {
if (typeof rule === "object" && rule?.use && Array.isArray(rule.use)) {
for (const loader of rule.use) {
if (typeof loader === "object" && loader?.loader?.includes("css-loader")) {
const cssLoader = loader;
if (cssLoader && typeof cssLoader === "object") {
const previousOptions = typeof cssLoader.options === "string" ? { } : cssLoader.options;
cssLoader.options = {
...previousOptions,
modules: {
...((typeof previousOptions?.modules === "string" ? { mode: previousOptions?.modules } : previousOptions?.modules)),
auto: true,
localIdentName: "[local]___[hash:base64:5]"
}
};
}
}
}
}
}

return config;
}
};


export default storybookConfig;
4 changes: 3 additions & 1 deletion apps/docs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"Switcher": true,
"IconSpecTable": true,
"PreviewComponent": true,
"MigrateGuide": true
"MigrateGuide": true,
"PackageInstallation": true,
"PropTable": true
},
"overrides": [
{
Expand Down
8 changes: 0 additions & 8 deletions apps/docs/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ a {
display: flex;
}

.hd-home {
display: flex;
flex-direction: column;
gap: 3rem;
min-height: 40vh;
justify-content: center;
}

.hd-display {
font-size: var(--hd-step-5);
font-weight: 500;
Expand Down
Loading

0 comments on commit 9a96242

Please sign in to comment.