docs: fix details component + other styling fixes (#5217)

* docs: fix details component

* general styling fixes
This commit is contained in:
Shahed Nasser
2023-09-26 19:03:07 +03:00
committed by GitHub
parent bc42b201ea
commit dee3419fe8
4 changed files with 15 additions and 5 deletions

View File

@@ -57,7 +57,9 @@ export const Button = ({
"dark:shadow-button-neutral dark:focus:shadow-button-neutral-focused dark:active:shadow-button-neutral-focused",
"select-none",
],
clear: ["bg-transparent shadow-none border-0 outline-none cursor-pointer"],
clear: [
"bg-transparent shadow-none border-0 outline-none cursor-pointer text-fg-medusa-subtle",
],
}
return (

View File

@@ -15,6 +15,7 @@ export type DetailsSummaryProps = {
export const DetailsSummary = ({
title,
subtitle,
children,
badge,
expandable = true,
open = false,
@@ -40,7 +41,7 @@ export const DetailsSummary = ({
titleClassName
)}
>
{title}
{title || children}
</span>
{subtitle && (
<span className="text-compact-medium text-medusa-fg-subtle">

View File

@@ -3,12 +3,17 @@ import clsx from "clsx"
export type InputTextProps = {
className?: string
addGroupStyling?: boolean
} & React.DetailedHTMLProps<
React.InputHTMLAttributes<HTMLInputElement>,
HTMLInputElement
>
export const InputText = (props: InputTextProps) => {
export const InputText = ({
addGroupStyling = false,
className,
...props
}: InputTextProps) => {
return (
<input
{...props}
@@ -17,6 +22,7 @@ export const InputText = (props: InputTextProps) => {
"border-medusa-border-base rounded-docs_sm border border-solid",
"px-docs_0.75 py-[9px]",
"hover:bg-medusa-bg-field-hover",
addGroupStyling && "group-hover:bg-medusa-bg-field-hover",
"focus:border-medusa-border-interactive",
"active:border-medusa-border-interactive",
"disabled:bg-medusa-bg-disabled",
@@ -24,7 +30,7 @@ export const InputText = (props: InputTextProps) => {
"placeholder:text-medusa-fg-muted",
"disabled:placeholder:text-medusa-fg-disabled",
"text-compact-medium font-base",
props.className
className
)}
/>
)

View File

@@ -53,7 +53,7 @@ export const SearchModalOpener = ({
)}
{!isMobile && (
<div
className={clsx("relative w-min hover:cursor-pointer")}
className={clsx("relative w-min hover:cursor-pointer group")}
onClick={handleOpen}
>
<MagnifyingGlass
@@ -73,6 +73,7 @@ export const SearchModalOpener = ({
onClick={handleOpen}
onFocus={(e) => e.target.blur()}
tabIndex={-1}
addGroupStyling={true}
/>
<span
className={clsx(