Skip to content

Commit

Permalink
Extract shared components into @darekkay/react-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
darekkay committed May 22, 2023
1 parent c493d21 commit 175118c
Show file tree
Hide file tree
Showing 47 changed files with 52 additions and 479 deletions.
4 changes: 2 additions & 2 deletions app/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
coverageThreshold: {
global: {
statements: 90,
branches: 84,
functions: 86,
branches: 80,
functions: 80,
lines: 90,
},
},
Expand Down
3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "1.5.0",
"author": "Darek Kay <hello@darekkay.com> (https://darekkay.com/)",
"dependencies": {
"@darekkay/styles": "3.3.4",
"@darekkay/react-ui": "1.1.0",
"@darekkay/styles": "4.2.1",
"@fortawesome/fontawesome-svg-core": "6.2.1",
"@fortawesome/free-brands-svg-icons": "6.2.1",
"@fortawesome/free-regular-svg-icons": "6.2.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from "react";
import { Button, ButtonProps } from "@darekkay/react-ui";

import Icon from "components/icon";
import Section from "components/section";

import Button, { Props as ButtonProps } from "../index";

interface RowProps {
title: string;
children?: React.ReactNode;
Expand Down Expand Up @@ -35,7 +34,7 @@ const Row = ({
);

export default {
title: "Components/Button",
title: "Shared Components/Button",
};

export const Variants = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useState } from "react";

import Input from "../index";
import { Input } from "@darekkay/react-ui";

export default {
title: "Components/Forms/Input",
title: "Shared Components/Forms/Input",
};

export const Variants = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from "react";
import { Link } from "@darekkay/react-ui";

import Icon from "components/icon";

import Link from "../index";

export default {
title: "Components/Link",
title: "Shared Components/Link",
};

export const Variants = () => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/common/hooks/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { Button } from "@darekkay/react-ui";

import Button from "components/button";
import Section from "components/section";

import usePrevious from "../usePrevious";
Expand Down
2 changes: 1 addition & 1 deletion app/src/common/testing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Common wrapper around testing utilities.
*
* All utilities from @testing-library/react are re-exported.
* Additionally, utilities from @testing-library/user-event and @testing-library/react-hooks are provided.
* Additionally, utilities from @testing-library/user-event are provided.
* */

import React from "react";
Expand Down
14 changes: 0 additions & 14 deletions app/src/components/button/__tests__/index.test.tsx

This file was deleted.

59 changes: 0 additions & 59 deletions app/src/components/button/index.tsx

This file was deleted.

131 changes: 0 additions & 131 deletions app/src/components/button/styles.scss

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/components/drawer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import { useTranslation } from "react-i18next";
import groupBy from "lodash/groupBy";
import { Link } from "@darekkay/react-ui";

import widgets, { WidgetProperties } from "widgets";
import { categories } from "widgets/categories";
import { WidgetType } from "widgets/list";
import Icon from "components/icon";
import Link from "components/link";

const categoriesWithWidgets = groupBy(widgets, (widget) => widget.category);

Expand Down
2 changes: 1 addition & 1 deletion app/src/components/forms/__stories__/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { Input } from "@darekkay/react-ui";

import Section from "components/section";
import Input from "components/forms/input";
import TextArea from "components/forms/text-area";
import Dropdown from "components/forms/dropdown";
import DatePicker from "components/forms/date-picker";
Expand Down
59 changes: 0 additions & 59 deletions app/src/components/forms/input/__tests__/index.test.tsx

This file was deleted.

0 comments on commit 175118c

Please sign in to comment.