Skip to content

Commit

Permalink
final polish:
Browse files Browse the repository at this point in the history
  • Loading branch information
svdimitr committed Nov 12, 2024
1 parent db61825 commit 9f30686
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const CategoryList: React.FC<CategoryListProps> = ({ data, title, subtitl
const navigate = useNavigate();

const onNavigate = (card: CardDescriptor) => {
if (card.collectionText === "AURELIA") {
console.log(card);
if (card.collectionText === `Collection \"AURELIA\"`) {
navigate("/category")
}
}
Expand Down
45 changes: 26 additions & 19 deletions examples/ecommerce-jewellery-store/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
import React from 'react';
import { Menu, AppBarSpacer } from "@progress/kendo-react-layout";
import React from "react";
import { Menu, AppBarSpacer, MenuItem } from "@progress/kendo-react-layout";
import { Button } from "@progress/kendo-react-buttons";
import { SvgIcon } from "@progress/kendo-react-common";
import { useNavigate } from "react-router-dom";

import {
InputPrefix,
InputSeparator,
TextBox,
Switch
Switch,
} from "@progress/kendo-react-inputs";


import { searchIcon, userIcon, cartIcon, paletteIcon } from "@progress/kendo-svg-icons";
import viloraLogo from '@/assets/vilora-logo.png';
import items from '@/data/items'
import languageItems from '@/data/language-items';

import {
AppBar,
AppBarSection,
} from "@progress/kendo-react-layout";
searchIcon,
userIcon,
cartIcon,
paletteIcon,
} from "@progress/kendo-svg-icons";
import viloraLogo from "@/assets/vilora-logo.png";
import items from "@/data/items";
import languageItems from "@/data/language-items";

import { AppBar, AppBarSection } from "@progress/kendo-react-layout";

const Header: React.FC = () => {
const navigate = useNavigate();

return (
<>
<AppBar themeColor="inherit">
<AppBarSection className="k-align-items-center" style={{ paddingLeft: '50px' }}>
<a href="#" className="k-d-sm-flex" style={{ marginRight: '50px' }}>
<AppBarSection
className="k-align-items-center"
style={{ paddingLeft: "50px" }}
>
<a href="#" className="k-d-sm-flex" style={{ marginRight: "50px" }}>
<img src={viloraLogo} alt="Logo" />
</a>
<Menu items={items} />
<Menu items={items}>
</Menu>
</AppBarSection>

<AppBarSection>
Expand All @@ -39,16 +47,15 @@ const Header: React.FC = () => {
<>
<InputPrefix orientation="horizontal">
<span className="k-input-prefix-text">
<SvgIcon icon={searchIcon} size="medium" />

<SvgIcon icon={searchIcon} size="medium" />
</span>
</InputPrefix>
<InputSeparator />
</>
)}
style={{ width: 300 }}
/>
<div style={{ marginLeft: '20px' }}>
<div style={{ marginLeft: "20px" }}>
<Button svgIcon={userIcon} fillMode="flat" className="k-ml-2" />
<Button svgIcon={cartIcon} fillMode="flat" className="k-ml-2" />
<Button svgIcon={paletteIcon} fillMode="flat" className="k-ml-2" />
Expand All @@ -57,7 +64,7 @@ const Header: React.FC = () => {

<AppBarSpacer style={{ width: 4 }} />

<AppBarSection style={{ marginRight: '50px' }}>
<AppBarSection style={{ marginRight: "50px" }}>
<Switch />
<Menu items={languageItems} />
</AppBarSection>
Expand Down
3 changes: 2 additions & 1 deletion examples/ecommerce-jewellery-store/src/data/items.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const items = [
{
"text": "Home",
"url": "/"
},
{
"text": "Jewelry",
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earings" }, { "text": "Watches" },{ "text": "All" }]
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earings" }, { "text": "Watches" },{ "text": "All" }],
},
{
"text": "Blog"
Expand Down

0 comments on commit 9f30686

Please sign in to comment.