Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 52 additions & 7 deletions lib/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,65 @@
"browser": true,
"window": true
},
"extends": ["airbnb", "prettier", "plugin:jest/recommended"],
"plugins": ["jest", "react-hooks"],
"extends": [
"airbnb",
"prettier",
"plugin:jest/recommended",
"plugin:storybook/recommended",
"plugin:storybook/recommended"
],
"plugins": [
"jest",
"react-hooks"
],
"rules": {
"linebreak-style": 0,
"no-use-before-define": ["error", { "functions": false }],
"no-underscore-dangle": ["error", { "allow": ["_options", "_links"] }],
"no-use-before-define": [
"error",
{
"functions": false
}
],
"no-underscore-dangle": [
"error",
{
"allow": [
"_options",
"_links"
]
}
],
"react/jsx-one-expression-per-line": "allow",
"no-nested-ternary": "off",
"import/extensions": "allow",
"import/no-unresolved": ["error", { "ignore": ["react", "styled-components"] }],
"react/prop-types": [2, { "ignore": ["children"] }],
"import/no-unresolved": [
"error",
{
"ignore": [
"react",
"styled-components"
]
}
],
"react/prop-types": [
2,
{
"ignore": [
"children"
]
}
],
"react/self-closing-comp": "allow",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
]
}
}
16 changes: 0 additions & 16 deletions lib/.storybook/components/DarkSection.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion lib/.storybook/components/ExampleContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
};

const ExampleContainer = ({ children, pseudoState, expanded = false }: Props): JSX.Element => (
<DivContainer className={pseudoState} expanded={expanded}>
<DivContainer className={`${pseudoState}-all`} expanded={expanded}>
{children}
</DivContainer>
);
Expand Down
6 changes: 0 additions & 6 deletions lib/.storybook/main.js

This file was deleted.

16 changes: 16 additions & 0 deletions lib/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"storybook-addon-pseudo-states",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
};
export default config;
34 changes: 0 additions & 34 deletions lib/.storybook/preview.js

This file was deleted.

32 changes: 32 additions & 0 deletions lib/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { HalstackProvider } from "../src/HalstackContext";
import styled from "styled-components";
import type { Preview } from "@storybook/react";
import React from "react";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(Story) => (
<HalstackProvider>
<Container>
<Story />
</Container>
</HalstackProvider>
),
],
};

const Container = styled.div`
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
"Droid Sans", "Helvetica Neue", sans-serif;
`;

export default preview;
Loading