Skip to content

Commit 951a75d

Browse files
committed
chore: updates in ecommerce-jewellery-store app
1 parent 5ef90e5 commit 951a75d

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

examples/ecommerce-jewellery-store/src/components/CardsList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const CardsList = (props: CardListProps) => {
1717
return (
1818
<div
1919
key={index}
20-
className="k-col-span-3 k-text-center k-border k-border-primary k-gap-1 k-pb-5"
20+
className={`${props.layout === 'grid' ? 'k-col-span-4' : 'k-col-span-3'} k-text-center k-border k-border-primary k-gap-1 k-pb-5`}
2121
>
2222
{item.status !== null ? (
2323
<BadgeContainer>
@@ -41,13 +41,14 @@ export const CardsList = (props: CardListProps) => {
4141
horizontal: "start",
4242
vertical: "top",
4343
}}
44+
style={{zIndex: 1}}
4445
>
4546
{item.status}
4647
</Badge>
4748
</BadgeContainer>
4849
) : (
4950
<div
50-
className="k-d-flex k-justify-content-center k-align-items-center k-rounded-lg"
51+
className="k-d-inline-block k-justify-content-center k-align-items-center k-rounded-lg"
5152
style={{
5253
backgroundImage: `url(${item.img})`,
5354
width: "278px",

examples/ecommerce-jewellery-store/src/components/FilterComponent.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { filterIcon, sortAscIcon } from "@progress/kendo-svg-icons";
55
import { FilterDescriptor, SortDescriptor, State } from "@progress/kendo-data-query";
66
import { useCategoriesContext } from "../helpers/CategoriesContext";
77
import { useLanguageContext } from "../helpers/LanguageContext";
8+
import { Button } from "@progress/kendo-react-buttons";
89

910
interface FilterComponentProps {
1011
updateUI: (state: State) => void;
@@ -15,7 +16,7 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
1516
const { t } = useLanguageContext();
1617

1718
const [categoryValue, setCategoryValue] = React.useState<string[]>([]);
18-
const [statusValue, setStatusValue] = React.useState<string>(t.statusRecommended);
19+
const [statusValue, setStatusValue] = React.useState<string>(t.statusesData[1]);
1920
const [materialValue, setMaterialValue] = React.useState<string>(t.materialPlaceholder);
2021

2122
const chips = t.categoriesData || [];
@@ -99,7 +100,7 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
99100

100101
const clearFilters = () => {
101102
setCategoryValue([]);
102-
setStatusValue(t.statusRecommended);
103+
setStatusValue(t.statusesData[1]);
103104
setMaterialValue(t.materialPlaceholder);
104105
setSelectedCategory(null);
105106
updateUI({ filter: undefined, sort: undefined });
@@ -129,10 +130,10 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
129130
<SvgIcon icon={sortAscIcon}></SvgIcon> {t.sortByLabel}
130131
</span>
131132
<span>
132-
<DropDownList data={statuses} value={statusValue} onChange={onStatusChange} />
133+
<DropDownList data={statuses} value={statusValue} onChange={onStatusChange} style={{minWidth: 150}} />
133134
</span>
134135
</span>
135-
<button className="k-button k-button-flat" onClick={clearFilters}>{t.clearFiltersButton}</button>
136+
<Button fillMode="flat" onClick={clearFilters}>{t.clearFiltersButton}</Button>
136137
</section>
137138
);
138139
};

examples/ecommerce-jewellery-store/src/components/Footer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ const Footer: React.FC = () => {
2121
<a href="#" className="k-d-block k-mb-4 k-text-align-center">
2222
<img src={viloraLogo} alt="Logo" />
2323
</a>
24-
<p className="k-m-0">{t.cookiesText}</p>
25-
<p className="k-m-0">{t.rightsReservedText}</p>
26-
<p className="k-mt-4">{t.subscribeText}</p>
24+
<p>{t.cookiesText}</p>
25+
<p>{t.rightsReservedText}</p>
26+
<p>{t.subscribeText}</p>
2727
<Label editorId="email" className="k-sr-only">{t.emailPlaceholder}</Label>
2828
<TextBox
2929
placeholder={t.emailPlaceholder}
30-
className="k-w-full"
30+
className="k-w-full !k-mb-3"
3131
suffix={() => (
3232
<InputSuffix>
3333
<InputSeparator />
3434
<Button themeColor="primary">{t.subscribeButtonText}</Button>
3535
</InputSuffix>
3636
)}
3737
/>
38-
<p className="k-mt-6">{t.followUsText}</p>
38+
<p>{t.followUsText}</p>
3939
<div className="k-d-flex k-gap-2 k-align-items-center">
4040
<p className="k-d-flex k-align-items-center" style={{ gap: '10px' }}>
4141
<SvgIcon icon={facebookIcon} size="xlarge" /> Facebook

examples/ecommerce-jewellery-store/src/components/Header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,8 @@ const Header: React.FC = () => {
5353
}
5454

5555
const selectedCategory = selectedItem.text;
56-
if (selectedCategory === t.all) {
57-
setSelectedCategory(null);
58-
} else {
5956
setSelectedCategory(selectedCategory ?? null);
6057
navigate("/category");
61-
}
6258
};
6359

6460
const handleLanguageMenuSelect = (event: MenuSelectEvent) => {
@@ -98,7 +94,7 @@ const Header: React.FC = () => {
9894
className="k-flex-basis-0 k-flex-grow k-gap-2 k-align-items-center"
9995
style={{ paddingLeft: "50px" }}
10096
>
101-
<a href="/" className="k-d-sm-flex" style={{ marginRight: "50px" }}>
97+
<a href="#" onClick={(e) => { e.preventDefault(); navigate('/'); }} className="k-d-sm-flex" style={{ marginRight: "50px" }}>
10298
<img src={viloraLogo} alt="Logo" />
10399
</a>
104100
<Menu items={translatedItems} onSelect={handleMenuSelect} />

examples/ecommerce-jewellery-store/src/data/items.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const items = [
55
},
66
{
77
"text": "Jewelry",
8-
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earings" }, { "text": "Watches" },{ "text": "All" }],
8+
"items": [{ "text": "Bracelets" }, { "text": "Rings" }, { "text": "Earrings" }, { "text": "Watches" },{ "text": "Necklaces" }],
99
},
1010
{
1111
"text": "Contacts",

examples/ecommerce-jewellery-store/src/pages/AllProductsListView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ export const AllProductsListView = () => {
8686
<Button
8787
fillMode="flat"
8888
svgIcon={gridLayoutIcon}
89+
togglable={true}
8990
selected={currentLayout === "grid"}
9091
onClick={() => setCurrentLayout("grid")}
9192
/>
9293
<Button
9394
fillMode="flat"
9495
svgIcon={layout2By2Icon}
96+
togglable={true}
9597
selected={currentLayout === "list"}
9698
onClick={() => setCurrentLayout("list")}
9799
/>

0 commit comments

Comments
 (0)