diff --git a/components/config-provider/demo/direction.tsx b/components/config-provider/demo/direction.tsx index 7ee726a880..6a8fb4a985 100644 --- a/components/config-provider/demo/direction.tsx +++ b/components/config-provider/demo/direction.tsx @@ -93,7 +93,7 @@ const cascaderOptions = [ type Placement = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; -const Page: React.FC<{ popupPlacement: Placement }> = ({ popupPlacement }) => { +const Page: React.FC<{ placement: Placement }> = ({ placement }) => { const [currentStep, setCurrentStep] = useState(0); const [modalOpen, setModalOpen] = useState(false); const [badgeCount, setBadgeCount] = useState(5); @@ -169,7 +169,7 @@ const Page: React.FC<{ popupPlacement: Placement }> = ({ popupPlacement }) => { options={cascaderOptions} onChange={onCascaderChange} placeholder="یک مورد انتخاب کنید" - popupPlacement={popupPlacement} + placement={placement} />     With search:   = ({ popupPlacement }) => { options={cascaderOptions} onChange={onCascaderChange} placeholder="Select an item" - popupPlacement={popupPlacement} + placement={placement} showSearch={{ filter: cascaderFilter }} /> @@ -495,15 +495,15 @@ const Page: React.FC<{ popupPlacement: Placement }> = ({ popupPlacement }) => { const App: React.FC = () => { const [direction, setDirection] = useState('ltr'); - const [popupPlacement, setPopupPlacement] = useState('bottomLeft'); + const [placement, setPlacement] = useState('bottomLeft'); const changeDirection = (e: RadioChangeEvent) => { const directionValue = e.target.value; setDirection(directionValue); if (directionValue === 'rtl') { - setPopupPlacement('bottomRight'); + setPlacement('bottomRight'); } else { - setPopupPlacement('bottomLeft'); + setPlacement('bottomLeft'); } }; @@ -521,7 +521,7 @@ const App: React.FC = () => { - + ); diff --git a/components/config-provider/demo/size.tsx b/components/config-provider/demo/size.tsx index 22e1a3aa9b..87c6465677 100644 --- a/components/config-provider/demo/size.tsx +++ b/components/config-provider/demo/size.tsx @@ -16,8 +16,6 @@ import type { ConfigProviderProps } from 'antd'; type SizeType = ConfigProviderProps['componentSize']; -const { TabPane } = Tabs; - const App: React.FC = () => { const [componentSize, setComponentSize] = useState('small'); @@ -37,17 +35,26 @@ const App: React.FC = () => { - - - Content of Tab Pane 1 - - - Content of Tab Pane 2 - - - Content of Tab Pane 3 - - +