Skip to content

Commit

Permalink
style :: shadow theme
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed May 4, 2024
1 parent 2e17295 commit 437caff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/style/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { color } from './themes/color';
import { effect } from './themes/effect';

export const theme = {
color,
effect,
} as const;
14 changes: 14 additions & 0 deletions src/style/themes/effect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const effectGenerator = (y: number, blur: number, opacity: number) =>
`
box-shadow: 0px ${y}px ${blur}px 0px rgba(0, 0, 0, ${opacity / 100});
`;

export const effect = {
shadow1: effectGenerator(4, 10, 8),
shadow2: effectGenerator(1, 15, 10),
shadow3: effectGenerator(3, 20, 19),
shadow4: effectGenerator(14, 14, 25),
shadow5: effectGenerator(19, 19, 30),
} as const;

export type fontKeyOfType = keyof typeof effect;

0 comments on commit 437caff

Please sign in to comment.