settings -> dark/light mode

This commit is contained in:
ari committed 2022-08-30 21:50:43 -04:00
1 parent 416d88b965
commit 03a735b281
47 files changed
+867 -736

No files matched your search

+10 -13
View File
@@ -78,17 +78,14 @@ const Test: FC = () => {
);
};
export default {
title: "Services/HA Service",
component: Test,
parameters: { actions: { argTypesRegex: "^on.*" } },
args: {},
} as ComponentMeta<typeof Test>;
import { makeStory } from "devUtils";
export const AutomationCall: ComponentStory<typeof Test> = (props) => {
return (
<Page>
<Test {...props} />
</Page>
);
};
const { make, componentMeta } = makeStory({
Component: Test,
meta: {
title: "Services/HA Service",
},
});
export default componentMeta;
export const AutomationCall = make({});
+9 -15
View File
@@ -1,8 +1,7 @@
import React, { FC } from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { useHADeviceRegistry } from "haService";
import InputYaml from "components/Inputs/Base/InputYaml";
import { makeStory } from "devUtils";
const Test: FC<{ onRender: () => void }> = ({ onRender }) => {
const conn = useHADeviceRegistry();
@@ -35,17 +34,12 @@ const Test: FC<{ onRender: () => void }> = ({ onRender }) => {
return <code>Loading...</code>;
};
export default {
title: "Services/Device Registry",
component: Test,
parameters: { actions: { argTypesRegex: "^on.*" } },
args: {},
} as ComponentMeta<typeof Test>;
const { make, componentMeta } = makeStory({
Component: Test,
meta: {
title: "Services/Device Registry",
},
});
export const Base: ComponentStory<typeof Test> = (props) => {
return (
<Page>
<Test {...props} />
</Page>
);
};
export default componentMeta;
export const Basic = make({});
+3 -3
View File
@@ -1,6 +1,6 @@
import React, { FC, useState } from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { MockPage } from "components/Page";
import { useHAEntities } from "haService/HAEntities";
const Test: FC<{ onRender: () => void }> = ({ onRender }) => {
@@ -50,8 +50,8 @@ export default {
export const Base: ComponentStory<typeof Test> = (props) => {
return (
<Page>
<MockPage>
<Test {...props} />
</Page>
</MockPage>
);
};
+3 -3
View File
@@ -1,6 +1,6 @@
import React, { FC } from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { MockPage } from "components/Page";
import { useHAEntityRegistry } from "haService";
const Test: FC<{ onRender: () => void }> = ({ onRender }) => {
@@ -43,8 +43,8 @@ export default {
export const Base: ComponentStory<typeof Test> = (props) => {
return (
<Page>
<MockPage>
<Test {...props} />
</Page>
</MockPage>
);
};
+3 -3
View File
@@ -1,6 +1,6 @@
import React, { FC, useEffect, useState } from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Page } from "components/Page";
import { MockPage } from "components/Page";
import { useHA } from "haService";
import InputYaml from "components/Inputs/Base/InputYaml";
import { InputList } from "components/Inputs/InputList";
@@ -89,8 +89,8 @@ export default {
export const ServiceCall: ComponentStory<typeof Test> = (props) => {
return (
<Page>
<MockPage>
<Test {...props} />
</Page>
</MockPage>
);
};