Skip to content

Commit 3db3082

Browse files
committed
chore: updates in kendo-react-ee-commerce-astro-app
1 parent 951a75d commit 3db3082

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

examples/kendo-react-e-commerce-astro-app/src/components/CardsList.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const CardsList: React.FC<CardListProps> = (props) => {
3939
return (
4040
<div
4141
key={index}
42-
className="k-col-span-3 k-text-center k-border k-border-primary k-gap-1 k-pb-5"
42+
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`}
4343
>
4444
{item.status ? (
4545
<BadgeContainer>
@@ -63,14 +63,15 @@ export const CardsList: React.FC<CardListProps> = (props) => {
6363
horizontal: 'start',
6464
vertical: 'top',
6565
}}
66+
style={{zIndex: 1}}
6667
>
6768
{t.statuses[item.status] || item.status}
6869
</Badge>
6970
)}
7071
</BadgeContainer>
7172
) : (
7273
<div
73-
className="k-d-flex k-justify-content-center k-align-items-center k-rounded-lg"
74+
className="k-d-inline-block k-justify-content-center k-align-items-center k-rounded-lg"
7475
style={{
7576
backgroundImage: `url(${item.img})`,
7677
width: '278px',

examples/kendo-react-e-commerce-astro-app/src/components/FilterComponent.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { selectedLanguage } from "../helpers/languageStore";
88
import enMessages from "../data/messages/en";
99
import frMessages from "../data/messages/fr";
1010
import esMessages from "../data/messages/es";
11+
import { Button } from "@progress/kendo-react-buttons";
1112

1213
const translations = {
1314
en: enMessages,
@@ -28,7 +29,7 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
2829
const t = getTranslations(language);
2930

3031
const [categoryValue, setCategoryValue] = useState<string[]>([]);
31-
const [statusValue, setStatusValue] = useState<string>(t.statusesData[0]);
32+
const [statusValue, setStatusValue] = useState<string>(t.statusesData[1]);
3233
const [materialValue, setMaterialValue] = useState<string>(t.materialPlaceholder);
3334

3435
const chips = t.categoriesData || [];
@@ -37,7 +38,7 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
3738

3839
useEffect(() => {
3940
setCategoryValue([]);
40-
setStatusValue(t.statusesData[0]);
41+
setStatusValue(t.statusesData[1]);
4142
setMaterialValue(t.materialPlaceholder);
4243
updateUI({ filter: undefined, sort: undefined });
4344
}, [language, t, updateUI]);
@@ -87,7 +88,7 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
8788

8889
const clearFilters = () => {
8990
setCategoryValue([]);
90-
setStatusValue(t.statusesData[0]);
91+
setStatusValue(t.statusesData[1]);
9192
setMaterialValue(t.materialPlaceholder);
9293
updateUI({ filter: undefined, sort: undefined });
9394
};
@@ -116,12 +117,12 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({ updateUI }) =>
116117
<SvgIcon icon={sortAscIcon}></SvgIcon> {t.sortByLabel}
117118
</span>
118119
<span>
119-
<DropDownList data={statuses} value={statusValue} onChange={onStatusChange} />
120+
<DropDownList data={statuses} value={statusValue} onChange={onStatusChange} style={{minWidth: 150}} />
120121
</span>
121122
</span>
122-
<button className="k-button k-button-flat" onClick={clearFilters}>
123+
<Button fillMode="flat" onClick={clearFilters}>
123124
{t.clearFiltersButton}
124-
</button>
125+
</Button>
125126
</section>
126127
);
127128
};

examples/kendo-react-e-commerce-astro-app/src/components/Footer.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,15 @@ const Footer: React.FC = () => {
4949
<a href="/" className="k-d-block k-mb-4 k-text-align-center">
5050
<img src="/kendo-react/kendo-react-e-commerce-astro-app/vilora-logo.png" alt="Logo" />
5151
</a>
52-
<p className="k-m-0">
53-
{t.cookiesText}
54-
</p>
55-
<p className="k-m-0">
56-
{t.rightsReservedText}
57-
</p>
58-
<p className="k-mt-4">
59-
{t.subscribeText}
60-
</p>
52+
<p>{t.cookiesText}</p>
53+
<p>{t.rightsReservedText}</p>
54+
<p>{t.subscribeText}</p>
6155
<Label editorId="email" className="k-sr-only">
6256
{t.emailPlaceholder}
6357
</Label>
6458
<TextBox
6559
placeholder={t.emailPlaceholder}
66-
className="k-w-full"
60+
className="k-w-full !k-mb-3"
6761
suffix={() => (
6862
<InputSuffix>
6963
<InputSeparator />
@@ -73,7 +67,7 @@ const Footer: React.FC = () => {
7367
</InputSuffix>
7468
)}
7569
/>
76-
<p className="k-mt-6">{t.followUsText}</p>
70+
<p>{t.followUsText}</p>
7771
<div className="k-d-flex k-gap-2 k-align-items-center">
7872
<p
7973
className="k-d-flex k-align-items-center"

examples/kendo-react-e-commerce-astro-app/src/components/Header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const Header: React.FC = () => {
5858
{ text: t.menuRings, url: "/kendo-react/kendo-react-e-commerce-astro-app/products?category=Rings" },
5959
{ text: t.menuEarrings, url: "/kendo-react/kendo-react-e-commerce-astro-app/products?category=Earrings" },
6060
{ text: t.menuWatches, url: "/kendo-react/kendo-react-e-commerce-astro-app/products?category=Watches" },
61-
{ text: t.menuAll, url: "/kendo-react/kendo-react-e-commerce-astro-app/products" },
61+
{ text: t.menuNecklaces, url: "/kendo-react/kendo-react-e-commerce-astro-app/products?category=Necklaces" },
6262
],
6363
},
6464
{
@@ -185,6 +185,7 @@ const Header: React.FC = () => {
185185
onItemClick={handleThemeChange}
186186
/>
187187
<Switch
188+
className="switch-width"
188189
onLabel={t.adminLabel}
189190
offLabel={t.clientLabel}
190191
checked={isAdminValue}

examples/kendo-react-e-commerce-astro-app/src/layouts/Layout.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
top: auto;
5959
z-index: 1000;
6060
}
61+
.switch-width {
62+
width: 72px !important;
63+
}
6164
</style>
6265
<slot name="head" />
6366
</head>

0 commit comments

Comments
 (0)