Skip to content

Commit

Permalink
fix: build, eslint MDS-919 (#42)
Browse files Browse the repository at this point in the history
* fix: build, eslint MDS-919

* Prettified Code!
  • Loading branch information
karl-kallavus authored Dec 22, 2023
1 parent 23397ae commit 74d5f1a
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/app/client/authcode/examples/ErrorState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ErrorState = () => {
// Trigger validation for this example
useEffect(() => {
trigger("authCode");
}, []);
}, [trigger]);
return (
<Form
onSubmit={handleSubmit(onSubmit)}
Expand Down
22 changes: 16 additions & 6 deletions docs/app/client/breadcrumb/examples/Collapsed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ import React from "react";
import { Breadcrumb } from "@heathmont/moon-core-tw";

const breadcrumbs = [
<a href="#">Home</a>,
<a href="#">Page 1</a>,
<a href="#">Page 2</a>,
<a href="#">Page 3</a>,
<a href="#">Page 4</a>,
<span>Current page</span>,
<a href="#" key="Home">
Home
</a>,
<a href="#" key="Page 1">
Page 1
</a>,
<a href="#" key="Page 2">
Page 2
</a>,
<a href="#" key="Page 3">
Page 3
</a>,
<a href="#" key="Page 4">
Page 4
</a>,
<span key="Current">Current page</span>,
];

export const Collapsed = () => {
Expand Down
20 changes: 14 additions & 6 deletions docs/app/client/breadcrumb/examples/CustomDivider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ import { Breadcrumb } from "@heathmont/moon-core-tw";
import { GenericHome, ControlsChevronRight } from "@heathmont/moon-icons-tw";

const breadcrumbs = [
<a href="#" aria-label="Home">
<a href="#" aria-label="Home" key="Home">
<GenericHome className="text-moon-24" />
</a>,
<a href="#">Page 1</a>,
<a href="#">Page 2</a>,
<a href="#">Page 3</a>,
<a href="#">Page 4</a>,
<span>Current page</span>,
<a href="#" key="Page 1">
Page 1
</a>,
<a href="#" key="Page 2">
Page 2
</a>,
<a href="#" key="Page 3">
Page 3
</a>,
<a href="#" key="Page 5">
Page 4
</a>,
<span key="Current">Current page</span>,
];

export const CustomDivider = () => {
Expand Down
14 changes: 10 additions & 4 deletions docs/app/client/breadcrumb/examples/FourItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ import React from "react";
import { Breadcrumb } from "@heathmont/moon-core-tw";

const breadcrumbs = [
<a href="#">Home</a>,
<a href="#">Page 1</a>,
<a href="#">Page 2</a>,
<span>Current page</span>,
<a href="#" key="home">
Home
</a>,
<a href="#" key="page 1">
Page 1
</a>,
<a href="#" key="page 2">
Page 2
</a>,
<span key="current">Current page</span>,
];

export const FourItems = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/app/client/breadcrumb/examples/OneItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from "react";
import { Breadcrumb } from "@heathmont/moon-core-tw";

const breadcrumbs = [<span>Current page</span>];
const breadcrumbs = [<span key="current">Current page</span>];

export const OneItem = () => {
return <Breadcrumb breadcrumbs={breadcrumbs} />;
Expand Down
7 changes: 6 additions & 1 deletion docs/app/client/breadcrumb/examples/TwoItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import React from "react";
import { Breadcrumb } from "@heathmont/moon-core-tw";

const breadcrumbs = [<a href="#">Home</a>, <span>Current page</span>];
const breadcrumbs = [
<a href="#" key="home">
Home
</a>,
<span key="current">Current page</span>,
];

export const TwoItems = () => {
return <Breadcrumb breadcrumbs={breadcrumbs} />;
Expand Down
15 changes: 7 additions & 8 deletions docs/app/server/accordion/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { PropsTable } from "@/components/propsTable";
import { QuickNav } from "@/components/QuickNav";
import { getExamples } from "@/utils/getExamples";
import { MDX } from "@/components/MDX";
import { ExampleSection } from "@/components/exampleSection/ExampleSection";
Expand Down Expand Up @@ -36,31 +35,31 @@ export default async function Accordion() {
data={[
{
name: "itemSize",
type: "sm | md | lg | xl",
type: ["sm", "md", "lg", "xl"],
defaultState: "md",
description: "Size of accordion item",
},
{
name: "singleOpen",
type: "boolean",
type: ["boolean"],
defaultState: "false",
description: "Whether only one item can be opened at a time",
},
{
name: "defaultValue",
type: "string",
type: ["string"],
defaultState: "-",
description: "The value of the item to expand",
},
{
name: "value",
type: "string[]",
type: ["string[]"],
defaultState: "-",
description: "The accordion items value",
},
{
name: "onValueChange",
type: "(value: string[]) => void",
type: ["(value: string[]) => void"],
defaultState: "-",
description:
"Event handler called when the expanded state of an item changes and prop singleOpen in false state",
Expand All @@ -72,13 +71,13 @@ export default async function Accordion() {
data={[
{
name: "value",
type: "string",
type: ["string"],
defaultState: "-",
description: "The accordion item value",
},
{
name: "disabled",
type: "boolean",
type: ["boolean"],
defaultState: "false",
description: "Set disabled/non-disabled",
},
Expand Down
20 changes: 10 additions & 10 deletions docs/app/server/button/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,61 +37,61 @@ export default async function Button() {
data={[
{
name: "animation",
type: "'progress' | 'success' | 'error' | 'pulse' | boolean",
type: ["progress", "success", "error", "pulse"],
defaultState: "-",
description: "Animation of button",
},
{
name: "as",
type: "a | button",
type: ["a , button"],
defaultState: "button",
description: "Rendered HTML element",
},
{
name: "children",
type: "React.ReactNode",
type: ["React.ReactNode"],
defaultState: "-",
description: "Children content",
},
{
name: "className",
type: "string",
type: ["string"],
defaultState: "-",
description: "Tailwind classes for customization",
},
{
name: "disabled",
type: "boolean",
type: ["boolean"],
defaultState: "false",
description: "Disabled button",
},
{
name: "fullWidth",
type: "boolean",
type: ["boolean"],
defaultState: "false",
description: "Full width button",
},
{
name: "iconLeft",
type: "JSX.Element",
type: ["JSX.Element"],
defaultState: "-",
description: "Left icon",
},
{
name: "iconRight",
type: "JSX.Element",
type: ["JSX.Element"],
defaultState: "-",
description: "Right icon",
},
{
name: "size",
type: "xs | sm | md | lg | xl",
type: ["xs", "sm", "md", "lg", "xl"],
defaultState: "md",
description: "Size of button",
},
{
name: "variant",
type: "fill | outline | ghost",
type: ["fill", "outline", "ghost"],
defaultState: "fill",
description: "Visual/Logical variant of button",
},
Expand Down
2 changes: 1 addition & 1 deletion docs/components/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Settings = () => {
// Apply the current theme from localStorage when loaded
useLayoutEffect(() => {
apply();
}, []);
}, [apply]);

return (
<Popover
Expand Down

0 comments on commit 74d5f1a

Please sign in to comment.