Skip to content

Commit

Permalink
fixes float label demo in multiselect (#5783)
Browse files Browse the repository at this point in the history
  • Loading branch information
navedqb authored Jan 16, 2024
1 parent edbe2dd commit 37d9ed6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/doc/multiselect/floatlabeldoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function FloatLabelDoc(props) {

const code = {
basic: `
<span className="p-float-label">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full md:w-20rem" />
<span className="p-float-label w-full md:w-20rem">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full" />
<label htmlFor="ms-cities">Select Cities</label>
</span>
`,
Expand All @@ -36,8 +36,8 @@ export default function FloatLabelDemo() {
return (
<div className="card flex justify-content-center">
<span className="p-float-label">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full md:w-20rem" />
<span className="p-float-label w-full md:w-20rem">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full" />
<label htmlFor="ms-cities">Select Cities</label>
</span>
</div>
Expand Down Expand Up @@ -65,8 +65,8 @@ export default function FloatLabelDemo() {
return (
<div className="card flex justify-content-center">
<span className="p-float-label">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full md:w-20rem" />
<span className="p-float-label w-full md:w-20rem">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full" />
<label htmlFor="ms-cities">Select Cities</label>
</span>
</div>
Expand All @@ -81,8 +81,8 @@ export default function FloatLabelDemo() {
<p>A floating label appears on top of the input field when focused.</p>
</DocSectionText>
<div className="card flex justify-content-center">
<span className="p-float-label">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full md:w-20rem" />
<span className="p-float-label w-full md:w-20rem">
<MultiSelect value={selectedCities} onChange={(e) => setSelectedCities(e.value)} options={cities} optionLabel="name" maxSelectedLabels={3} className="w-full" />
<label htmlFor="ms-cities">Select Cities</label>
</span>
</div>
Expand Down

0 comments on commit 37d9ed6

Please sign in to comment.