Skip to content

Commit

Permalink
Merge branch 'prod'
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrogenous committed Jan 29, 2024
2 parents 5944db7 + 5178a19 commit 60e6ef0
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 83 deletions.
79 changes: 26 additions & 53 deletions components/doc/multiselect/loadingdoc.js
Original file line number Diff line number Diff line change
@@ -1,76 +1,49 @@
import { DocSectionCode } from '@/components/doc/common/docsectioncode';
import { DocSectionText } from '@/components/doc/common/docsectiontext';
import { MultiSelect } from '@/components/lib/multiselect/MultiSelect';
import { useState } from 'react';

export function LoadingDoc(props) {
const code = {
basic: `
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name"
placeholder="Select Cities" maxSelectedLabels={3} className="w-full md:w-20rem" />
const code = {
basic: `
<MultiSelect loading placeholder="Loading..." className="w-full md:w-20rem" />
`,
javascript: `
import React, { useState } from "react";
javascript: `
import React from "react";
import { MultiSelect } from 'primereact/multiselect';
export default function BasicDemo() {
const [selectedCities, setSelectedCities] = useState(null);
const cities = [
{ name: 'New York', code: 'NY' },
{ name: 'Rome', code: 'RM' },
{ name: 'London', code: 'LDN' },
{ name: 'Istanbul', code: 'IST' },
{ name: 'Paris', code: 'PRS' }
];
export default function LoadingDemo() {
return (
<div className="card flex justify-content-center">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name"
placeholder="Select Cities" maxSelectedLabels={3} className="w-full md:w-20rem" />
<MultiSelect loading placeholder="Loading..." className="w-full md:w-20rem" />
</div>
);
}
`,
typescript: `
import React, { useState } from "react";
import { MultiSelect, MultiSelectChangeEvent } from 'primereact/multiselect';
interface City {
name: string;
code: string;
}
export default function BasicDemo() {
const [selectedCities, setSelectedCities] = useState<City | null>(null);
const cities: City[] = [
{ name: 'New York', code: 'NY' },
{ name: 'Rome', code: 'RM' },
{ name: 'London', code: 'LDN' },
{ name: 'Istanbul', code: 'IST' },
{ name: 'Paris', code: 'PRS' }
];
typescript: `
import React from "react";
import { MultiSelect } from 'primereact/multiselect';
export default function LoadingDemo() {
return (
<div className="card flex justify-content-center">
<MultiSelect value={selectedCities} onChange={(e: MultiSelectChangeEvent) => setSelectedCities(e.value)} options={cities} optionLabel="name"
placeholder="Select Cities" maxSelectedLabels={3} className="w-full md:w-20rem" />
<MultiSelect loading placeholder="Loading..." className="w-full md:w-20rem" />
</div>
);
}
`
};
};

return (
<>
<DocSectionText {...props}>
<p>
Loading state can be used <i>loading</i> property.
</p>
</DocSectionText>
<div className="card flex justify-content-center">
<MultiSelect loading placeholder="Loading..." className="w-full md:w-20rem" />
</div>
<DocSectionCode code={code} />
</>
);
return (
<>
<DocSectionText {...props}>
<p>
Loading state can be used <i>loading</i> property.
</p>
</DocSectionText>
<div className="card flex justify-content-center">
<MultiSelect loading placeholder="Loading..." className="w-full md:w-20rem" />
</div>
<DocSectionCode code={code} />
</>
);
}
30 changes: 0 additions & 30 deletions pages/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,36 +99,6 @@ const TemplatesPage = () => {
</div>
</div>
</div>
<div className="col-12 lg:col-6 xl:col-4">
<div className="card mb-0">
<a href="https://www.primefaces.org/sapphire-react" rel="noopener noreferrer" target="_blank">
<img alt="Sapphire" src="https://primefaces.org/cdn/primereact/images/layouts/sapphire-react.jpg" className="w-full" />
</a>
<div className="flex gap-3 mt-3">
<a href="https://www.primefaces.org/sapphire-react" className="flex-1 p-button p-component" rel="noopener noreferrer" target="_blank">
<span className="p-button-label white-space-nowrap">Preview</span>
</a>
<a href="https://www.primefaces.org/layouts/sapphire-react" className="flex-1 p-button p-component p-button-outlined" rel="noopener noreferrer" target="_blank">
<span className="p-button-label white-space-nowrap">Learn More</span>
</a>
</div>
</div>
</div>
<div className="col-12 lg:col-6 xl:col-4">
<div className="card mb-0">
<a href="https://www.primefaces.org/serenity-react" rel="noopener noreferrer" target="_blank">
<img alt="Serenity" src="https://primefaces.org/cdn/primereact/images/layouts/serenity-react.jpg" className="w-full" />
</a>
<div className="flex gap-3 mt-3">
<a href="https://www.primefaces.org/serenity-react" className="flex-1 p-button p-component" rel="noopener noreferrer" target="_blank">
<span className="p-button-label white-space-nowrap">Preview</span>
</a>
<a href="https://www.primefaces.org/layouts/serenity-react" className="flex-1 p-button p-component p-button-outlined" rel="noopener noreferrer" target="_blank">
<span className="p-button-label white-space-nowrap">Learn More</span>
</a>
</div>
</div>
</div>
<div className="col-12 lg:col-6 xl:col-4">
<div className="card mb-0">
<a href="https://www.primefaces.org/babylon-react" rel="noopener noreferrer" target="_blank">
Expand Down
Binary file not shown.
Binary file not shown.
Binary file removed public/images/landing/templates/sapphire-react.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed public/images/layouts/sapphire-react.jpg
Binary file not shown.
Binary file removed public/images/layouts/serenity-react.jpg
Binary file not shown.
Binary file removed public/images/layouts/themeswitcher-sapphire.png
Binary file not shown.
Binary file removed public/images/layouts/themeswitcher-serenity.png
Binary file not shown.

0 comments on commit 60e6ef0

Please sign in to comment.