Skip to content

Commit

Permalink
Some fixes on website
Browse files Browse the repository at this point in the history
  • Loading branch information
allevo committed Nov 27, 2024
1 parent 2dca63e commit 4914ccc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
11 changes: 7 additions & 4 deletions packages/components/src/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export async function Dropdown(
{ label, openOn, align, children }: ComponentProps<DropdownPropsType>,
{ component, app }: Contexts,
) {
console.log("......");
console.log(label);

const classes = ["dropdown"];
if (openOn === "hover") {
classes.push("dropdown-hover");
Expand Down Expand Up @@ -55,7 +52,6 @@ export async function Dropdown(
}
}

console.log("label", label, typeof label);
const btn =
typeof label === "string" ? (
<div tabIndex={0} role="button" className="btn m-1">
Expand All @@ -65,6 +61,13 @@ export async function Dropdown(
label
);

if (btn instanceof HTMLElement) {
// This is needed for Safari, otherwise the dropdown won't open
// See: https://github.com/allevo/seqflow-js/issues/29
// See: https://stackoverflow.com/questions/61652836/why-does-focus-within-not-work-in-safari
btn.tabIndex = 0;
}

component.renderSync(
<>
{btn}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function Menu(
{ component, app }: Contexts,
) {
component._el.classList.add(...["menu", "rounded-box"]);
component._el.tabIndex = 0;

if (direction) {
/*
Expand Down
9 changes: 0 additions & 9 deletions packages/website/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ export async function Header(
Blog
</Link>
</Menu.Item>
{/*<Menu.Item>
<Link
showAsButton="ghost"
href="/api-reference"
id="api-reference-link"
>
Api Reference
</Link>
</Menu.Item>*/}
<Menu.Item>
<Menu.SubMenu label="Examples">{getExamples()}</Menu.SubMenu>
</Menu.Item>
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ ${setupArrow.name}();
<div className={classes["arrow-wrapper"]}>
<ArrowSVG />
</div>,
script,
<div
className="arrow-anchor"
style={{ position: "absolute", top: "0%", opacity: "0" }}
Expand All @@ -56,6 +55,7 @@ ${setupArrow.name}();
className="arrow-anchor"
style={{ position: "absolute", top: "50%", opacity: "0" }}
/>,
script,
]);

Prism.highlightAll();
Expand Down
4 changes: 3 additions & 1 deletion packages/website/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export default {
'./src/public/*.{js,jsx,ts,tsx,css,md,mdx}',
],
theme: {
extend: {},
extend: {
ringColor: "transparent",
},
},
plugins: [
require("@tailwindcss/typography"),
Expand Down

0 comments on commit 4914ccc

Please sign in to comment.