Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'sor4chi/strict-auth-env' of https://github.com/saitamau…
Browse files Browse the repository at this point in the history
…-maximum/meline into sor4chi/strict-auth-env
  • Loading branch information
sor4chi committed Nov 16, 2023
2 parents b19dc66 + 94397f5 commit afa4565
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 2 deletions.
14 changes: 14 additions & 0 deletions client/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type { StorybookConfig } from "@storybook/react-vite";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import { mergeConfig } from "vite"
import path from "path";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
Expand All @@ -15,5 +18,16 @@ const config: StorybookConfig = {
docs: {
autodocs: "tag",
},
viteFinal: async (config) => {
return mergeConfig(config, {
plugins: [vanillaExtractPlugin()],
resolve: {
alias: {
"@": path.resolve(__dirname, "../src"),
},
base: "./",
},
});
}
};
export default config;
28 changes: 28 additions & 0 deletions client/src/styles/__stories__/Theme.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import "../global.css";
import { vars } from "../theme.css";

const styles = {
background: vars.color.gray[1],
color: vars.color.gray[12],
padding: "16px",
border: `1px solid ${vars.color.gray[6]}`,
borderRadius: "8px",
width: "fit-content",
};

const LightWrapper = ({ children }: { children: React.ReactNode }) => (
<div className="light" style={styles}>
{children}
</div>
);

const DarkWrapper = ({ children }: { children: React.ReactNode }) => (
<div className="dark" style={styles}>
{children}
</div>
);

export const Theme = {
Light: LightWrapper,
Dark: DarkWrapper,
};
65 changes: 65 additions & 0 deletions client/src/styles/__stories__/color-tokens.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import type { Meta } from "@storybook/react";
import { vars } from "../theme.css";
import { Theme } from "./Theme";

const meta = {
title: "Styles/Color Tokens",
} satisfies Meta;

export default meta;

const ColorTokens = () => (
<>
<h1>Color Tokens</h1>
<div
style={{
display: "flex",
gap: "32px",
padding: "32px",
}}
>
{Object.entries(vars.color.gray).map(([key, value]) => (
<div
key={key}
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
gap: "12px",
}}
>
<div
key={key}
style={{
backgroundColor: value,
height: "48px",
width: "48px",
borderRadius: "50%",
border: `1px solid ${vars.color.gray[6]}`,
}}
/>
<code
style={{
fontSize: "0.75rem",
color: vars.color.gray[12],
}}
>
Gray {key}
</code>
</div>
))}
</div>
</>
);

export const Light = () => (
<Theme.Light>
<ColorTokens />
</Theme.Light>
);

export const Dark = () => (
<Theme.Dark>
<ColorTokens />
</Theme.Dark>
);
4 changes: 2 additions & 2 deletions server/domain/entity/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ type User struct {
DeletedAt time.Time `json:"deleted_at"`
}

func NewUserEntity(id uint64, providerID, name, ImageURL string, createdAt, updatedAt, deletedAt time.Time) *User {
func NewUserEntity(id uint64, providerID, name, imageURL string, createdAt, updatedAt, deletedAt time.Time) *User {
return &User{
ID: id,
ProviderID: providerID,
Name: name,
ImageURL: ImageURL,
ImageURL: imageURL,
CreatedAt: createdAt,
UpdatedAt: updatedAt,
DeletedAt: deletedAt,
Expand Down

0 comments on commit afa4565

Please sign in to comment.