Skip to content

Commit

Permalink
docs: fix oneOf design hiding more than three items (#10077)
Browse files Browse the repository at this point in the history
* docs: fix oneOf design hiding more than three items

* fix lint errors

* fix eslint
  • Loading branch information
shahednasser authored Nov 13, 2024
1 parent 938f3bd commit 662b096
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,21 @@ const TagOperationParamatersOneOf = ({
return (
<>
<div className={clsx("flex items-center gap-1 pl-1")}>
<span className="inline-block">One of</span>
<ul className="mb-0 flex list-none gap-1">
<span className="inline-block text-compact-x-small">One of</span>
<ul className="mb-0 flex list-none gap-0.5 flex-wrap">
{schema.oneOf?.map((item, index) => (
<li
key={index}
className={clsx(
"rounded-xs cursor-pointer p-0.5",
"border border-solid",
"rounded-full cursor-pointer px-[10px]",
"flex justify-center items-center text-compact-small-plus",
"focus:shadow-borders-interactive-with-focus transition-colors",
activeTab === index && [
"bg-medusa-bg-subtle border-medusa-border-strong",
"text-medusa-fg-base bg-medusa-bg-base",
"shadow-elevation-card-rest dark:shadow-elevation-card-rest-dark",
],
activeTab !== index && [
"bg-medusa-bg-base border-medusa-border-base",
"text-medusa-fg-muted hover:text-medusa-fg-base",
]
)}
onClick={() => setActiveTab(index)}
Expand Down
2 changes: 1 addition & 1 deletion www/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const compat = new FlatCompat({
export default [
prettier,
{
ignores: ["**/dist", "**/build"],
ignores: ["**/dist", "**/build", "**/global-config.ts"],
}, ...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const CodeBlockHeader = ({
badgeLabel,
actionsProps,
badgeColor,
hideActions = false
hideActions = false,
}: CodeBlockHeaderProps) => {
const { colorMode } = useColorMode()

Expand Down

0 comments on commit 662b096

Please sign in to comment.