Skip to content

Commit 36a4a78

Browse files
committed
Fix ui issues
1 parent 6cf0fe5 commit 36a4a78

File tree

8 files changed

+41
-46
lines changed

8 files changed

+41
-46
lines changed

examples/sandbox/src/Router.tsx

+1-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ export default function Router() {
1919
const isHomePage = location.pathname === "/";
2020

2121
return (
22-
<div
23-
className={`${
24-
isHomePage
25-
? "App"
26-
: "text-black bg-white w-screen max-w-screen-xl mx-auto"
27-
}`}
28-
>
22+
<div className={`${isHomePage ? "App" : "text-black bg-white mx-auto"}`}>
2923
<Switch>
3024
<Route exact path="/" component={Root} />
3125

examples/sandbox/src/pages/ecommerce/Category.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const BrowseHeader = ({ category }) => {
5959
export default function CategoryPage(props) {
6060
const category = props?.match?.params.category;
6161
return (
62-
<>
62+
<div className="ecommerce-container">
6363
<Navigation />
6464
<BrowseHeader category={category} />
6565
<SearchProvider config={categoryPageconfig(category)}>
@@ -114,6 +114,6 @@ export default function CategoryPage(props) {
114114
</ErrorBoundary>
115115
</div>
116116
</SearchProvider>
117-
</>
117+
</div>
118118
);
119119
}

examples/sandbox/src/pages/ecommerce/ListingPage.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const categoryItems = {
6565

6666
export default () => {
6767
return (
68-
<>
68+
<div className="ecommerce-container">
6969
<Navigation />
7070
<div className="max-w-screen-xl mx-auto py-12 px-4 sm:px-6 lg:px-8 grid md:grid-cols-4 gap-4 grid-cols-2">
7171
{Object.keys(categoryItems).map((category) => (
@@ -86,6 +86,6 @@ export default () => {
8686
</div>
8787
))}
8888
</div>
89-
</>
89+
</div>
9090
);
9191
};

examples/sandbox/src/pages/ecommerce/Search.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ const Search = () => {
6868
};
6969
export default function App() {
7070
return (
71-
<>
71+
<div className="ecommerce-container">
7272
<Navigation />
7373
<SearchProvider config={config}>
7474
<Search />
7575
</SearchProvider>
76-
</>
76+
</div>
7777
);
7878
}

examples/sandbox/src/pages/ecommerce/index.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import * as React from "react";
44
import Navigation from "./components/Navigation";
55
import ProductCarousel from "./components/ProductCarousel";
6-
import "./styles.css";
6+
import "./styles.scss";
77

88
export default function Ecommerce() {
99
return (
10-
<>
10+
<div className="ecommerce-container">
1111
<Navigation />
1212
<div className="max-w-screen-xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
1313
<ProductCarousel
@@ -19,6 +19,6 @@ export default function Ecommerce() {
1919
filters={[{ field: "parent_category", values: ["Monitors"] }]}
2020
/>
2121
</div>
22-
</>
22+
</div>
2323
);
2424
}

examples/sandbox/src/pages/ecommerce/styles.css

-29
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
.ecommerce-container {
6+
.sui-layout-header.sui-layout-header {
7+
padding: 0;
8+
}
9+
10+
.sui-layout-main-header {
11+
margin-bottom: 1rem;
12+
}
13+
14+
.sui-layout-header {
15+
border: none;
16+
}
17+
18+
.navigation {
19+
position: sticky;
20+
top: 0;
21+
z-index: 40;
22+
background-color: #000;
23+
transition-property: all;
24+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
25+
transition-duration: 0.15s;
26+
}
27+
28+
.sui-search-box__suggestion-list {
29+
width: 200px;
30+
}
31+
}

examples/sandbox/src/styles.css

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
}
2121

2222
body {
23-
place-items: center;
2423
font-family: var(--font-family);
2524
background-color: var(--background);
2625
color: var(--foreground);

0 commit comments

Comments
 (0)