Skip to content

feat: add light theme #11266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Dec 20, 2023
Prev Previous commit
Next Next commit
ok
  • Loading branch information
aslilac committed Dec 19, 2023
commit ee81c62b72df88eef6d87d0d6ff043f9d07c005f
4 changes: 2 additions & 2 deletions site/src/components/Dialogs/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
disabled={disabled}
type="submit"
css={[
type === "delete" && styles.warningButton,
type === "delete" && styles.dangerButton,
type === "success" && styles.successButton,
]}
>
Expand All @@ -70,7 +70,7 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
};

const styles = {
warningButton: (theme) => ({
dangerButton: (theme) => ({
"&.MuiButton-contained": {
backgroundColor: theme.experimental.roles.danger.fill,
borderColor: theme.experimental.roles.danger.outline,
Expand Down
15 changes: 4 additions & 11 deletions site/src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,7 @@ export const FormSection: FC<
}}
className={classes.sectionInfo}
>
<h2
css={[
styles.formSectionInfoTitle,
alpha && styles.formSectionInfoTitleAlpha,
]}
className={classes.infoTitle}
>
<h2 css={styles.formSectionInfoTitle} className={classes.infoTitle}>
{title}
{alpha && <AlphaBadge />}
{deprecated && <DeprecatedBadge />}
Expand All @@ -149,19 +143,18 @@ export const FormFields: FC<PropsWithChildren> = ({ children }) => {

const styles = {
formSectionInfoTitle: (theme) => ({
display: "flex",
gap: 6,
fontSize: 20,
color: theme.palette.text.primary,
fontWeight: 400,
margin: 0,
marginBottom: 8,
}),

formSectionInfoTitleAlpha: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: 12,
},
}),

formSectionInfoDescription: (theme) => ({
fontSize: 14,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import LicensesSettingsPageView from "./LicensesSettingsPageView";
import { chromatic } from "testHelpers/chromatic";
import { MockLicenseResponse } from "testHelpers/entities";
import LicensesSettingsPageView from "./LicensesSettingsPageView";

export default {
title: "pages/DeploySettingsPage/LicensesSettingsPageView",
parameters: { chromatic },
component: LicensesSettingsPageView,
};

Expand Down
4 changes: 3 additions & 1 deletion site/src/pages/HealthPage/storybook.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import type { Meta } from "@storybook/react";
import { useQueryClient } from "react-query";
import {
reactRouterParameters,
reactRouterOutlet,
RouteDefinition,
} from "storybook-addon-react-router-v6";
import { chromatic } from "testHelpers/chromatic";
import {
MockBuildInfo,
MockEntitlements,
MockExperiments,
MockHealth,
MockHealthSettings,
} from "testHelpers/entities";
import { Meta } from "@storybook/react";
import { HEALTH_QUERY_KEY, HEALTH_QUERY_SETTINGS_KEY } from "api/queries/debug";
import { DashboardProvider } from "components/Dashboard/DashboardProvider";
import { HealthLayout } from "./HealthLayout";
Expand All @@ -26,6 +27,7 @@ export const generateMeta = ({ element, path, params }: MetaOptions): Meta => {
return {
render: HealthLayout,
parameters: {
chromatic,
layout: "fullscreen",
reactRouter: reactRouterParameters({
location: { pathParams: params },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { Meta, StoryObj } from "@storybook/react";
import { TemplateInsightsPageView } from "./TemplateInsightsPage";
import { chromatic } from "testHelpers/chromatic";
import { MockEntitlementsWithUserLimit } from "testHelpers/entities";
import { TemplateInsightsPageView } from "./TemplateInsightsPage";

const meta: Meta<typeof TemplateInsightsPageView> = {
title: "pages/TemplatePage/TemplateInsightsPageView",
parameters: { chromatic },
component: TemplateInsightsPageView,
};

Expand Down
2 changes: 1 addition & 1 deletion site/src/theme/dark/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default {
danger: {
background: colors.orange[950],
outline: colors.orange[500],
fill: colors.orange[600],
fill: colors.orange[700],
text: colors.orange[50],
disabled: {
background: colors.orange[950],
Expand Down