Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app-elements/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

--font-*: initial;
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
--font-mono: "Roboto Mono", system-ui;
--font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

--text-*: initial;
--text-2xs: 0.75rem;
Expand Down
2 changes: 1 addition & 1 deletion packages/app-elements/src/ui/atoms/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const CodeBlock = withSkeletonTemplate<CodeBlockProps>(
<div className="flex group w-full rounded bg-gray-50 in-[.overlay-container]:bg-gray-200">
<div
className={cn(
"flex flex-col w-full px-4 py-2.5 text-teal text-sm font-mono marker:font-bold border-none break-all",
"flex flex-col w-full px-4 py-2.5 text-primary text-sm font-mono marker:font-bold border-none break-all",
typeof children !== "string" ? "whitespace-pre-wrap" : "",
)}
data-testid="codeblock-content"
Expand Down
11 changes: 10 additions & 1 deletion packages/app-elements/src/ui/atoms/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ type TextVariant =
| "info"
| "plain"
| "disabled"
type TextSize = "x-small" | "small" | "regular" | "large" | "inherit"
| "code"
type TextSize =
| "xx-small"
| "x-small"
| "small"
| "regular"
| "large"
| "inherit"
type TextWeight = "regular" | "medium" | "semibold" | "bold" | "inherit"
type TextAlignment = "center" | "left" | "right" | "inherit"
type TextWrap = "normal" | "nowrap" | "inherit"
Expand Down Expand Up @@ -43,12 +50,14 @@ function Text({
"text-gray-500": variant === "info",
"text-orange-600": variant === "warning",
"text-gray-300": variant === "disabled",
"font-mono font-semibold! bg-gray-100 rounded-sm p-1.5": variant === "code",
// weight
"font-regular": weight === "regular",
"font-medium": weight === "medium",
"font-semibold": weight === "semibold",
"font-bold": weight === "bold",
// size
"text-2xs": size === "xx-small",
"text-xs": size === "x-small",
"text-sm": size === "small",
"text-base": size === "regular",
Expand Down
10 changes: 1 addition & 9 deletions packages/docs/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,500;1,500&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="storybook-preview.css" />
<script>
window.global = window;
</script>
</script>
10 changes: 10 additions & 0 deletions packages/docs/src/stories/atoms/Text.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ Success.args = {
children:
"Commerce Layer is a multi-market commerce API and order management system",
}

export const CodeinLine: StoryFn = () => (
<div>
Use{" "}
<Text variant="code" size="x-small">
InputDateRange
</Text>{" "}
in between other text.
</div>
)
Loading