Skip to content

Commit f2b8df9

Browse files
committed
merge themes, use ts version
1 parent bede0ee commit f2b8df9

File tree

4 files changed

+14
-52
lines changed

4 files changed

+14
-52
lines changed

packages/app/src/app/pages/common/Modals/ShareModal2/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import queryString from 'query-string';
1919
import { useOvermind } from 'app/overmind';
2020
import { ThemeProvider } from 'styled-components';
2121

22-
import { theme } from '@codesandbox/common/lib/design-language';
22+
import theme from '@codesandbox/common/lib/design-language/theme';
2323
import { Sandbox } from '@codesandbox/common/lib/types';
2424

2525
import FileTree from 'embed/components/Sidebar/FileTree';

packages/common/src/design-language/index.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/common/src/design-language/theme.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
// this theme follows the System UI Theme Specification
2+
// Ref: https://system-ui.com/theme
3+
14
import { colors } from './colors';
2-
import { fontSizes, fontWeights } from './typography';
5+
import { fonts, fontSizes, fontWeights } from './typography';
36

47
const theme = {
58
colors,
9+
10+
fonts,
611
fontSizes,
712
fontWeights,
813

914
// we use a 4 point grid
10-
space: [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40],
15+
space: [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40], // for margin + padding
16+
sizes: [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40], // for width + height
1117

1218
// transition speeds in ms
1319
speeds: [0, '75ms', '100ms', '150ms', '200ms', '300ms', '500ms'],

packages/common/src/design-language/typography.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
export const fonts = {
2+
body: 'Inter, sans-serif',
3+
code: 'Source Code Pro, monospace',
4+
};
5+
16
export const fontSizes = [
27
0,
38
9, // not used yet.

0 commit comments

Comments
 (0)