import { Dock } from "primereact/dock";
export const DockDemo = () => {
const imgPath = "images/dock";
const imgErrorPath =
"https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png";
const items = [
{
label: "Finder",
icon: () => (
<img
alt="Finder"
src={`${imgPath}/finder.svg`}
onError={(e) => (e.target.src = imgErrorPath)}
width="100%"
/>
),
},
{
label: "App Store",
icon: () => (
<img
alt="App Store"
src={`${imgPath}/appstore.svg`}
onError={(e) => (e.target.src = imgErrorPath)}
width="100%"
/>
),
},
{
label: "Photos",
icon: () => (
<img
alt="Photos"
src={`${imgPath}/photos.svg`}
onError={(e) => (e.target.src = imgErrorPath)}
width="100%"
/>
),
},
{
label: "Trash",
icon: () => (
<img
alt="trash"
src={`${imgPath}/trash.png`}
onError={(e) => (e.target.src = imgErrorPath)}
width="100%"
/>
),
},
];
return <Dock model={items} />;
};
#The default export is not a React Component in page dock
6 messages · Page 1 of 1 (latest)