Skip to content

Commit

Permalink
Fix#6443 sync with vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekl0w committed Apr 22, 2024
1 parent b049ec6 commit 790deed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions components/doc/tabview/scrollabledoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { DocSectionText } from '@/components/doc/common/docsectiontext';
import { TabPanel, TabView } from '@/components/lib/tabview/TabView';

export function ScrollableDoc(props) {
const tabs = Array.from({ length: 50 }, (_, i) => ({ title: `Tab ${i + 1}`, content: `Tab ${i + 1} Content` }));
const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: `Tab ${i + 1}`, content: `Tab ${i + 1} Content` }));
const code = {
basic: `
<TabView scrollable>
{tabs.map((tab) => {
{scrollableTabs.map((tab) => {
return (
<TabPanel key={tab.title} header={tab.title}>
<p className="m-0">{tab.content}</p>
Expand All @@ -21,12 +21,12 @@ import React, { useState } from 'react';
import { TabView, TabPanel } from 'primereact/tabview';
export default function ScrollableDemo() {
const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` }))
const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` }))
return (
<div className="card">
<TabView scrollable>
{tabs.map((tab) => {
{scrollableTabs.map((tab) => {
return (
<TabPanel key={tab.title} header={tab.title}>
<p className="m-0">{tab.content}</p>
Expand All @@ -43,12 +43,12 @@ import React, { useState } from 'react';
import { TabView, TabPanel } from 'primereact/tabview';
export default function ScrollableDemo() {
const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` }))
const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` }))
return (
<div className="card">
<TabView scrollable>
{tabs.map((tab) => {
{scrollableTabs.map((tab) => {
return (
<TabPanel key={tab.title} header={tab.title}>
<p className="m-0">{tab.content}</p>
Expand All @@ -71,7 +71,7 @@ export default function ScrollableDemo() {
</DocSectionText>
<div className="card">
<TabView scrollable>
{tabs.map((tab) => {
{scrollableTabs.map((tab) => {
return (
<TabPanel key={tab.title} header={tab.title}>
<p className="m-0">{tab.content}</p>
Expand Down

0 comments on commit 790deed

Please sign in to comment.