Add experimental high contrast mode (#1845)

Add an experimental high contrast color theme to SCM-Manager. The high contrast mode uses a dark background and color with a high contrast for a better accessibility.
The change adds the theme to ui-styles and theme switcher to the storybook of ui-components.
This commit is contained in:
Sebastian Sdorra
2021-11-04 08:33:11 +01:00
committed by GitHub
parent 07f0b22031
commit 0efdd2a483
53 changed files with 60796 additions and 60183 deletions

View File

@@ -26,7 +26,7 @@ import { MemoryRouter } from "react-router-dom";
import { storiesOf } from "@storybook/react";
import AddKeyValueEntryToTableField from "./AddKeyValueEntryToTableField";
storiesOf("Forms|AddKeyValueEntryToTableField", module)
storiesOf("Forms/AddKeyValueEntryToTableField", module)
.addDecorator((story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
.add("Default", () => (
<div className="m-6">

View File

@@ -105,7 +105,7 @@ const LegacyEvents: FC = () => {
);
};
storiesOf("Forms|Checkbox", module)
storiesOf("Forms/Checkbox", module)
.addDecorator(storyFn => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("Default", () => (
<Spacing>

View File

@@ -25,7 +25,7 @@ import React from "react";
import { storiesOf } from "@storybook/react";
import DropDown from "./DropDown";
storiesOf("Forms|DropDown", module)
storiesOf("Forms/DropDown", module)
.add("Default", () => (
<DropDown
options={["en", "de", "es"]}

View File

@@ -63,7 +63,7 @@ const ReactHookForm: FC = () => {
);
};
storiesOf("Forms|FileInput", module)
storiesOf("Forms/FileInput", module)
.addDecorator((storyFn) => <Decorator>{storyFn()}</Decorator>)
.addDecorator((storyFn) => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("Default", () => <ReactHookForm />);

View File

@@ -127,7 +127,7 @@ const LegacyEvents: FC = () => {
);
};
storiesOf("Forms|InputField", module)
storiesOf("Forms/InputField", module)
.addDecorator((storyFn) => <Decorator>{storyFn()}</Decorator>)
.addDecorator((storyFn) => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("AutoFocus", () => <InputField label="Field with AutoFocus" autofocus={true} />)

View File

@@ -112,7 +112,7 @@ const LegacyEvents: FC = () => {
);
};
storiesOf("Forms|Radio", module)
storiesOf("Forms/Radio", module)
.addDecorator(storyFn => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("Default", () => (
<Spacing>

View File

@@ -198,7 +198,7 @@ const PreselectOption: FC = () => {
);
};
storiesOf("Forms|Select", module)
storiesOf("Forms/Select", module)
.addDecorator((storyFn) => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("Add no existing value", () => <AddNoExistingValue />)
.add("Ref", () => <Ref />)

View File

@@ -170,7 +170,7 @@ const LegacyEvents: FC = () => {
);
};
storiesOf("Forms|Textarea", module)
storiesOf("Forms/Textarea", module)
.addDecorator((storyFn) => <MemoryRouter>{storyFn()}</MemoryRouter>)
.add("OnChange", () => <OnChangeTextarea />)
.add("OnSubmit", () => <OnSubmitTextare />)