Skip to content

Commit

Permalink
fix: update padding and fix positioning (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Dec 21, 2024
1 parent 5975c21 commit fb288cf
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/fern-docs/components/.storybook/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
--accent-aaa: 173, 255, 140;
--accent-tinted: 191, 255, 165;
--background: 0, 0, 0;
--accent-contrast: 0, 0, 0;
--accent-contrast: #000;
--bg-color-card: var(--grayscale-a2);
--sidebar-background: transparent;
--header-background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion packages/fern-docs/components/src/FernButtonV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const buttonVariants = cva(
variants: {
variant: {
default:
"bg-[var(--accent-10)] text-[var(--accent-1)] hover:bg-[var(--accent-9)]",
"bg-[var(--accent-10)] text-[var(--accent-contrast,var(--accent-1))] hover:bg-[var(--accent-9)]",
destructive:
"bg-[var(--red-10)] text-[var(--red-12)] hover:bg-[var(--red-11)]",
outline:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ const AskAIComposer = forwardRef<
const inputRef = useRef<HTMLTextAreaElement>(null);
return (
<div
className="cursor-text border-t border-[var(--grayscale-a6)]"
className="cursor-text border-t border-[var(--grayscale-a6)] p-2"
onClick={() => inputRef.current?.focus()}
>
<DesktopCommandInput asChild>
Expand Down Expand Up @@ -538,12 +538,12 @@ const AskAIComposer = forwardRef<
)}
/>
</DesktopCommandInput>
<div className="flex items-center justify-between px-2 pb-2">
<div className="flex items-center justify-between">
<div>{actions}</div>
<Button
size="icon"
className="rounded-full"
variant="ghost"
variant="default"
onClick={isLoading ? stop : () => onSend?.(value)}
disabled={!isLoading && !canSubmit}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/fern-docs/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = {
"accent-aa": withOpacity("--accent-aa"),
"accent-aaa": withOpacity("--accent-aaa"),
"accent-tinted": "var(--accent-10)",
"accent-contrast": withOpacity("--accent-contrast"),
"accent-contrast": "var(--accent-contrast)",
"accent-muted": `var(--accent-6)`,
"accent-highlight": "var(--accent-3)",
"accent-highlight-faded": "var(--accent-2)",
Expand Down
4 changes: 2 additions & 2 deletions packages/fern-docs/ui/.storybook/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
--accent-aaa: 49, 99, 29;
--accent-tinted: 55, 111, 32;
--background: 255, 255, 255;
--accent-contrast: 255, 255, 255;
--accent-contrast: #fff;
--bg-color-card: rgba(255, 255, 255, 70%);
--sidebar-background: transparent;
--header-background: transparent;
Expand Down Expand Up @@ -63,7 +63,7 @@
--accent-aaa: 173, 255, 140;
--accent-tinted: 191, 255, 165;
--background: 0, 0, 0;
--accent-contrast: 0, 0, 0;
--accent-contrast: #000;
--bg-color-card: var(--grayscale-a2);
--sidebar-background: transparent;
--header-background: transparent;
Expand Down
9 changes: 0 additions & 9 deletions packages/fern-docs/ui/src/search/SearchV2.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
CommandActions,
CommandAskAIGroup,
CommandEmpty,
CommandGroupFilters,
CommandGroupPlayground,
Expand Down Expand Up @@ -153,7 +152,6 @@ export function SearchV2(): ReactElement | false {
<DesktopSearchDialog
open={open}
onOpenChange={setOpen}
asChild
trigger={<DesktopSearchButton />}
>
{isAskAiEnabled ? (
Expand Down Expand Up @@ -184,13 +182,6 @@ export function SearchV2(): ReactElement | false {
);
}}
>
<CommandAskAIGroup
onAskAI={(initialInput) => {
setInitialInput(initialInput);
setAskAi(true);
}}
forceMount
/>
{children}
</DesktopCommandWithAskAI>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export function getColorVariables(
[CSS_VARIABLES.ACCENT_PRIMARY_AAA]: `${accentPrimaryLightAAA.r}, ${accentPrimaryLightAAA.g}, ${accentPrimaryLightAAA.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_TINTED]: `${accentPrimaryLightTinted.r}, ${accentPrimaryLightTinted.g}, ${accentPrimaryLightTinted.b}`,
[CSS_VARIABLES.BACKGROUND]: `${backgroundColorLight.r}, ${backgroundColorLight.g}, ${backgroundColorLight.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_CONTRAST]: `${accentPrimaryLightContrast.r}, ${accentPrimaryLightContrast.g}, ${accentPrimaryLightContrast.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_CONTRAST]: `rgb(${accentPrimaryLightContrast.r}, ${accentPrimaryLightContrast.g}, ${accentPrimaryLightContrast.b})`,
[CSS_VARIABLES.CARD_BACKGROUND]:
cardBackgroundLight?.toRgbString() ??
tinycolor("white").setAlpha(0.7).toRgbString(),
Expand Down Expand Up @@ -452,7 +452,7 @@ export function getColorVariables(
[CSS_VARIABLES.ACCENT_PRIMARY_AAA]: `${accentPrimaryDarkAAA.r}, ${accentPrimaryDarkAAA.g}, ${accentPrimaryDarkAAA.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_TINTED]: `${accentPrimaryDarkTinted.r}, ${accentPrimaryDarkTinted.g}, ${accentPrimaryDarkTinted.b}`,
[CSS_VARIABLES.BACKGROUND]: `${backgroundColorDark.r}, ${backgroundColorDark.g}, ${backgroundColorDark.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_CONTRAST]: `${accentPrimaryDarkContrast.r}, ${accentPrimaryDarkContrast.g}, ${accentPrimaryDarkContrast.b}`,
[CSS_VARIABLES.ACCENT_PRIMARY_CONTRAST]: `rgb(${accentPrimaryDarkContrast.r}, ${accentPrimaryDarkContrast.g}, ${accentPrimaryDarkContrast.b})`,
[CSS_VARIABLES.CARD_BACKGROUND]:
cardBackgroundDark?.toRgbString() ??
tinycolor(backgroundColorDark).darken(2).setAlpha(0.5).toRgbString(),
Expand Down

0 comments on commit fb288cf

Please sign in to comment.