repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/badge-debug.tsx
components/float-button/demo/badge-debug.tsx
import React, { useState } from 'react'; import { ConfigProvider, FloatButton, Slider } from 'antd'; import type { ConfigProviderProps, GetProp } from 'antd'; type AliasToken = GetProp<ConfigProviderProps, 'theme'>['token']; const App: React.FC = () => { const [radius, setRadius] = useState<number>(0); const tok...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/controlled.tsx
components/float-button/demo/controlled.tsx
import React, { useState } from 'react'; import { CommentOutlined, CustomerServiceOutlined } from '@ant-design/icons'; import { FloatButton, Switch } from 'antd'; const App: React.FC = () => { const [open, setOpen] = useState<boolean>(true); return ( <> <Switch onChange={setOpen} checked={open} style={{ ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/type.tsx
components/float-button/demo/type.tsx
import React from 'react'; import { QuestionCircleOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton icon={<QuestionCircleOutlined />} type="primary" style={{ insetInlineEnd: 24 }} /> <FloatButton icon={<QuestionCircleOutlined />} type="defa...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/badge.tsx
components/float-button/demo/badge.tsx
import React from 'react'; import { QuestionCircleOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton shape="circle" style={{ insetInlineEnd: 24 + 70 + 70 }} badge={{ dot: true }} /> <FloatButton.Group shape="circle" style={{ insetInlineEnd: ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/group-menu.tsx
components/float-button/demo/group-menu.tsx
import React from 'react'; import { CommentOutlined, CustomerServiceOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton.Group trigger="click" type="primary" style={{ insetInlineEnd: 24 }} icon={<CustomerServiceOutlined />}...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/placement.tsx
components/float-button/demo/placement.tsx
import React from 'react'; import { CommentOutlined, DownOutlined, LeftOutlined, RightOutlined, UpOutlined, } from '@ant-design/icons'; import { Flex, FloatButton } from 'antd'; const BOX_SIZE = 100; const BUTTON_SIZE = 40; const wrapperStyle: React.CSSProperties = { width: '100%', height: '100vh', ov...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/tooltip.tsx
components/float-button/demo/tooltip.tsx
import React from 'react'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton style={{ insetBlockEnd: 108 }} tooltip={{ // tooltipProps is supported starting from version 5.25.0. title: 'Since 5.25.0+', color: 'blue', placement: 'top', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/basic.tsx
components/float-button/demo/basic.tsx
import React from 'react'; import { FloatButton } from 'antd'; const App: React.FC = () => <FloatButton onClick={() => console.log('onClick')} />; export default App;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/shape.tsx
components/float-button/demo/shape.tsx
import React from 'react'; import { CustomerServiceOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton shape="circle" type="primary" style={{ insetInlineEnd: 94 }} icon={<CustomerServiceOutlined />} /> <FloatButton...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/_semantic_group.tsx
components/float-button/demo/_semantic_group.tsx
import React from 'react'; import { AlertOutlined, BugOutlined, BulbOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,设置悬浮按...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/content.tsx
components/float-button/demo/content.tsx
import React from 'react'; import { FileTextOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; const App: React.FC = () => ( <> <FloatButton icon={<FileTextOutlined />} content="HELP INFO" shape="square" style={{ insetInlineEnd: 24 }} /> <FloatButton content=...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/float-button/demo/style-class.tsx
components/float-button/demo/style-class.tsx
import React from 'react'; import { QuestionCircleOutlined } from '@ant-design/icons'; import { FloatButton } from 'antd'; import type { FloatButtonProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyles = createStyles(({ token }) => ({ root: { border: `1px solid ${token.colorBorder}`, ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/index.tsx
components/popconfirm/index.tsx
import * as React from 'react'; import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled'; import { omit, useControlledState } from '@rc-component/util'; import { clsx } from 'clsx'; import type { RenderFunction } from '../_util/getRenderPropValue'; import type { SemanticClassNamesType, SemanticS...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/PurePanel.tsx
components/popconfirm/PurePanel.tsx
import * as React from 'react'; import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled'; import { clsx } from 'clsx'; import type { PopconfirmProps } from '.'; import ActionButton from '../_util/ActionButton'; import { getRenderPropValue } from '../_util/getRenderPropValue'; import type { Seman...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/style/index.ts
components/popconfirm/style/index.ts
import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks } from '../../theme/internal'; export interface ComponentToken { /** * @desc 确认框 z-index * @descEN z-index of Popconfirm */ zIndexPopup: number; } /** * @desc Popconfirm 组件的 Token * @descEN Tok...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/a11y.test.ts
components/popconfirm/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('popconfirm', { disabledRules: ['button-name'] });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/index.test.tsx
components/popconfirm/__tests__/index.test.tsx
import React from 'react'; import { spyElementPrototype } from '@rc-component/util/lib/test/domHook'; import Popconfirm from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils'; ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/type.test.tsx
components/popconfirm/__tests__/type.test.tsx
import * as React from 'react'; import Popconfirm from '..'; describe('Popconfirm.typescript', () => { it('Popconfirm.okType', () => { const form = <Popconfirm title="" okType="danger" />; expect(form).toBeTruthy(); }); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/image.test.ts
components/popconfirm/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Popconfirm image', () => { imageDemoTest('popconfirm', { onlyViewport: ['shift.tsx'], }); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/demo-extend.test.ts
components/popconfirm/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('popconfirm', { skip: ['shift.tsx'], });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/demo.test.tsx
components/popconfirm/__tests__/demo.test.tsx
import * as React from 'react'; import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest'; demoTest('popconfirm', { testRootProps: false, skip: ['shift.tsx'], }); rootPropsTest( 'popconfirm', (Popconfirm, props) => ( <Popconfirm {...props}> <span /> </Popconfirm> ), { fin...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/__tests__/semantic.test.tsx
components/popconfirm/__tests__/semantic.test.tsx
import React from 'react'; import { spyElementPrototype } from '@rc-component/util/lib/test/domHook'; import Popconfirm from '..'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { render } from '../../../tests/utils'; describe('Popconfirm.semantic'...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/async.tsx
components/popconfirm/demo/async.tsx
import React, { useState } from 'react'; import { Button, Popconfirm } from 'antd'; const App: React.FC = () => { const [open, setOpen] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false); const showPopconfirm = () => { setOpen(true); }; const handleOk = () => { setConfir...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/_semantic.tsx
components/popconfirm/demo/_semantic.tsx
import React from 'react'; import { Popconfirm } from 'antd'; import type { PopconfirmProps } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,设置绝对定位、层级、变换原点、箭头指向和弹层容器样式', contai...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/render-panel.tsx
components/popconfirm/demo/render-panel.tsx
import React from 'react'; import { Popconfirm } from 'antd'; const { _InternalPanelDoNotUseOrYouWillBeFired: InternalPopconfirm } = Popconfirm; const App: React.FC = () => ( <> <InternalPopconfirm title="Are you OK?" description="Does this look good?" /> <InternalPopconfirm title="Are you OK?" ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/wireframe.tsx
components/popconfirm/demo/wireframe.tsx
import React from 'react'; import { ConfigProvider, Popconfirm } from 'antd'; const { _InternalPanelDoNotUseOrYouWillBeFired: InternalPopconfirm } = Popconfirm; const App: React.FC = () => ( <ConfigProvider theme={{ token: { wireframe: true } }}> <InternalPopconfirm title="Are you OK?" /> <InternalPopconfir...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/locale.tsx
components/popconfirm/demo/locale.tsx
import React from 'react'; import { Button, Popconfirm } from 'antd'; const App: React.FC = () => ( <Popconfirm title="Delete the task" description="Are you sure to delete this task?" okText="Yes" cancelText="No" > <Button danger>Delete</Button> </Popconfirm> ); export default App;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/placement.tsx
components/popconfirm/demo/placement.tsx
import React from 'react'; import { Button, ConfigProvider, Flex, Popconfirm } from 'antd'; const text = 'Are you sure to delete this task?'; const description = 'Delete the task'; const buttonWidth = 80; const App: React.FC = () => ( <ConfigProvider button={{ style: { width: buttonWidth, margin: 4 } }}> <Flex ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/promise.tsx
components/popconfirm/demo/promise.tsx
import React from 'react'; import { Button, Popconfirm } from 'antd'; const App: React.FC = () => { const confirm = () => new Promise((resolve) => { setTimeout(() => resolve(null), 3000); }); return ( <Popconfirm title="Title" description="Open Popconfirm with Promise" onConfir...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/basic.tsx
components/popconfirm/demo/basic.tsx
import React from 'react'; import type { PopconfirmProps } from 'antd'; import { Button, message, Popconfirm } from 'antd'; const App: React.FC = () => { const [messageApi, holder] = message.useMessage(); const confirm: PopconfirmProps['onConfirm'] = (e) => { console.log(e); messageApi.success('Click on Y...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/icon.tsx
components/popconfirm/demo/icon.tsx
import React from 'react'; import { QuestionCircleOutlined } from '@ant-design/icons'; import { Button, Popconfirm } from 'antd'; const App: React.FC = () => ( <Popconfirm title="Delete the task" description="Are you sure to delete this task?" icon={<QuestionCircleOutlined style={{ color: 'red' }} />} ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/dynamic-trigger.tsx
components/popconfirm/demo/dynamic-trigger.tsx
import React, { useState } from 'react'; import { Button, message, Popconfirm, Switch } from 'antd'; const App: React.FC = () => { const [open, setOpen] = useState(false); const [condition, setCondition] = useState(true); const changeCondition = (checked: boolean) => { setCondition(checked); }; const c...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/style-class.tsx
components/popconfirm/demo/style-class.tsx
import React from 'react'; import { Button, Flex, Popconfirm } from 'antd'; import type { PopconfirmProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyles = createStyles(() => ({ container: { padding: 10, }, })); const styles: PopconfirmProps['styles'] = { container: { backgroun...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/popconfirm/demo/shift.tsx
components/popconfirm/demo/shift.tsx
import React from 'react'; import { Button, Popconfirm } from 'antd'; const style: React.CSSProperties = { width: '300vw', height: '300vh', display: 'flex', alignItems: 'center', justifyContent: 'center', }; const App: React.FC = () => { React.useEffect(() => { document.documentElement.scrollTop = doc...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/index.tsx
components/alert/index.tsx
import InternalAlert from './Alert'; import ErrorBoundary from './ErrorBoundary'; export type { AlertProps } from './Alert'; export type { ErrorBoundaryProps } from './ErrorBoundary'; type CompoundedComponent = typeof InternalAlert & { ErrorBoundary: typeof ErrorBoundary; }; const Alert = InternalAlert as Compound...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/Alert.tsx
components/alert/Alert.tsx
import type { ReactElement } from 'react'; import * as React from 'react'; import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled'; import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; import CloseOutlined from '@ant-design/icons/CloseOutlined'; import ExclamationCircleFilled from '@ant-desi...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/ErrorBoundary.tsx
components/alert/ErrorBoundary.tsx
import * as React from 'react'; import Alert from './Alert'; export interface ErrorBoundaryProps { title?: React.ReactNode; /** * @deprecated please use `title` instead. */ message?: React.ReactNode; description?: React.ReactNode; children?: React.ReactNode; id?: string; } interface ErrorBoundarySt...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/style/index.ts
components/alert/style/index.ts
import type { CSSProperties } from 'react'; import type { CSSObject } from '@ant-design/cssinjs'; import { unit } from '@ant-design/cssinjs'; import { resetComponent } from '../../style'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks } from '../../theme/i...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/a11y.test.ts
components/alert/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('alert', { disabledRules: ['button-name'] });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/index.test.tsx
components/alert/__tests__/index.test.tsx
import React from 'react'; import { warning } from '@rc-component/util'; import userEvent from '@testing-library/user-event'; import Alert from '..'; import { accessibilityTest } from '../../../tests/shared/accessibilityTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { act, fireEvent, render, screen...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/image.test.ts
components/alert/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Alert image', () => { imageDemoTest('alert'); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/demo.test.ts
components/alert/__tests__/demo.test.ts
import demoTest from '../../../tests/shared/demoTest'; demoTest('alert', { skip: ['loop-banner.tsx', 'component-token.tsx'] });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/demo-extend.test.ts
components/alert/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('alert', { skip: ['loop-banner.tsx', 'component-token.tsx'] });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/__tests__/semantic.test.tsx
components/alert/__tests__/semantic.test.tsx
import React from 'react'; import { clsx } from 'clsx'; import Alert from '..'; import type { AlertProps } from '..'; import { render } from '../../../tests/utils'; import ConfigProvider from '../../config-provider'; describe('Alert.Semantic', () => { it('should support classNames and styles as functions', () => { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/design/behavior-pattern.tsx
components/alert/design/behavior-pattern.tsx
import React from 'react'; import useLocale from '../../../.dumi/hooks/useLocale'; import BehaviorMap from '../../../.dumi/theme/common/BehaviorMap'; const locales = { cn: { title: '了解页面/模块内需要关注的提示', understandAlertInfo: '了解提示信息', understandAlertContent: '了解提示内容', understandAlertType: '了解提示类型', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/design/demo/type.tsx
components/alert/design/demo/type.tsx
import React from 'react'; import { Alert, Flex } from 'antd'; import useLocale from '../../../../.dumi/hooks/useLocale'; const locales = { cn: { successTitle: '成功提示', successMessage1: '恭喜!你所提交的信息已经审核通过,如有问题请联系客服。', successMessage2: '已成功!', successDescription2: '你所提交的信息已经审核通过,请及时跟进申请状况。如有问题,请联...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/design/demo/content.tsx
components/alert/design/demo/content.tsx
import React from 'react'; import { Alert, Flex } from 'antd'; import useLocale from '../../../../.dumi/hooks/useLocale'; const locales = { cn: { welcomeMessage: '你好!欢迎使用专业版,你可以根据自身需求添加业务模块。', helpTitle: '帮助信息', helpDescription: '你好,由于你的良好信用,我们决定赠送你三个月产品会员,欲了解会员特权与活动请进首页会员专区查看。', }, en: { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/design/demo/action.tsx
components/alert/design/demo/action.tsx
import React from 'react'; import { Alert, Flex, Typography } from 'antd'; import useLocale from '../../../../.dumi/hooks/useLocale'; const locales = { cn: { closeAlertTitle: '关闭提示', welcomeMessage: '你好!欢迎使用专业版,你可以根据自身需求添加业务模块。', helpTitle: '帮助信息', helpDescription: '你好,由于你的良好信用,我们决定赠送你三个月产品会员,...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/loop-banner.tsx
components/alert/demo/loop-banner.tsx
import React from 'react'; import { Alert } from 'antd'; import Marquee from 'react-fast-marquee'; const App: React.FC = () => ( <Alert banner title={ <Marquee pauseOnHover gradient={false}> I can be a React component, multiple React components, or just some text. </Marquee> } /> );...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/_semantic.tsx
components/alert/demo/_semantic.tsx
import React from 'react'; import { Alert, Button, Space } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,包含边框、背景色、内边距、圆角、位置布局等警告提示框的基础样式', section: '内容元素,采用 flex 布局控制内容区域的排版和最...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/closable.tsx
components/alert/demo/closable.tsx
import React from 'react'; import { Alert } from 'antd'; const onClose: React.MouseEventHandler<HTMLButtonElement> = (e) => { console.log(e, 'I was closed.'); }; const App: React.FC = () => ( <> <Alert title="Warning Title" type="warning" closable={{ closeIcon: true, onClose, 'aria-label': '...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/smooth-closed.tsx
components/alert/demo/smooth-closed.tsx
import React, { useState } from 'react'; import { Alert, Switch } from 'antd'; const App: React.FC = () => { const [visible, setVisible] = useState(true); const handleClose = () => { setVisible(false); }; return ( <> {visible && ( <Alert title="Alert Message Text" ty...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/error-boundary.tsx
components/alert/demo/error-boundary.tsx
import React, { useState } from 'react'; import { Alert, Button } from 'antd'; const { ErrorBoundary } = Alert; const ThrowError: React.FC = () => { const [error, setError] = useState<Error>(); const onClick = () => { setError(new Error('An Uncaught Error')); }; if (error) { throw error; } return...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/banner.tsx
components/alert/demo/banner.tsx
import React from 'react'; import { Alert } from 'antd'; const App: React.FC = () => ( <> <Alert title="Warning text" banner /> <br /> <Alert title="Very long warning text warning text text text text text text text" banner closable /> <br /> <Alert showIcon={false} title="Wa...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/component-token.tsx
components/alert/demo/component-token.tsx
import React from 'react'; import { SmileOutlined } from '@ant-design/icons'; import { Alert, ConfigProvider } from 'antd'; const icon = <SmileOutlined />; const App: React.FC = () => ( <ConfigProvider theme={{ components: { Alert: { withDescriptionIconSize: 32, withDescription...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/basic.tsx
components/alert/demo/basic.tsx
import React from 'react'; import { Alert } from 'antd'; const App: React.FC = () => <Alert title="Success Text" type="success" />; export default App;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/action.tsx
components/alert/demo/action.tsx
import React from 'react'; import { Alert, Button, Space } from 'antd'; const App: React.FC = () => ( <> <Alert title="Success Tips" type="success" showIcon action={ <Button size="small" type="text"> UNDO </Button> } closable /> <br /> <Al...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/style.tsx
components/alert/demo/style.tsx
import React from 'react'; import { Alert } from 'antd'; const App: React.FC = () => ( <> <Alert title="Success Text" type="success" /> <br /> <Alert title="Info Text" type="info" /> <br /> <Alert title="Warning Text" type="warning" /> <br /> <Alert title="Error Text" type="error" /> </...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/icon.tsx
components/alert/demo/icon.tsx
import React from 'react'; import { Alert } from 'antd'; const App: React.FC = () => ( <> <Alert title="Success Tips" type="success" showIcon /> <br /> <Alert title="Informational Notes" type="info" showIcon /> <br /> <Alert title="Warning" type="warning" showIcon closable /> <br /> <Aler...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/description.tsx
components/alert/demo/description.tsx
import React from 'react'; import { Alert } from 'antd'; const App: React.FC = () => ( <> <Alert title="Success Text" description="Success Description Success Description Success Description" type="success" /> <br /> <Alert title="Info Text" description="Info Description...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/custom-icon.tsx
components/alert/demo/custom-icon.tsx
import React from 'react'; import { SmileOutlined } from '@ant-design/icons'; import { Alert } from 'antd'; const icon = <SmileOutlined />; const App: React.FC = () => ( <> <Alert icon={icon} title="showIcon = false" type="success" /> <br /> <Alert icon={icon} title="Success Tips" type="success" showIco...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/alert/demo/style-class.tsx
components/alert/demo/style-class.tsx
import React from 'react'; import { Alert, Button, Flex } from 'antd'; import type { AlertProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyle = createStyles(({ css }) => ({ root: css` border: 2px dashed #ccc; border-radius: 8px; padding: 12px; `, })); const styleFn: AlertPro...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/index.tsx
components/input-number/index.tsx
import * as React from 'react'; import { MinusOutlined, PlusOutlined } from '@ant-design/icons'; import DownOutlined from '@ant-design/icons/DownOutlined'; import UpOutlined from '@ant-design/icons/UpOutlined'; import RcInputNumber from '@rc-component/input-number'; import type { InputNumberProps as RcInputNumberProp...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/style/token.ts
components/input-number/style/token.ts
import { FastColor } from '@ant-design/fast-color'; import type { SharedComponentToken, SharedInputToken } from '../../input/style/token'; import { initComponentToken } from '../../input/style/token'; import type { FullToken, GetDefaultToken } from '../../theme/internal'; export interface ComponentToken extends Share...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/style/index.ts
components/input-number/style/index.ts
import { unit } from '@ant-design/cssinjs'; import { genBasicInputStyle, genPlaceholderStyle, initInputToken } from '../../input/style'; import { genBorderlessStyle, genFilledStyle, genOutlinedStyle, genUnderlinedStyle, } from '../../input/style/variants'; import { resetComponent, resetIcon } from '../../style...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/a11y.test.ts
components/input-number/__tests__/a11y.test.ts
import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; accessibilityDemoTest('input-number', { disabledRules: ['label'] });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/suffix.test.tsx
components/input-number/__tests__/suffix.test.tsx
import React from 'react'; import InputNumber from '..'; import { fireEvent, render } from '../../../tests/utils'; describe('suffix', () => { it('should support suffix prop', () => { const { container } = render(<InputNumber suffix={<i>hello</i>} />); expect(container.querySelector('.ant-input-number-suffix...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/addon.test.tsx
components/input-number/__tests__/addon.test.tsx
import React from 'react'; import InputNumber from '..'; import { render } from '../../../tests/utils'; describe('addon', () => { it('disabled status when prefix is active', () => { const { container } = render(<InputNumber prefix="¥" defaultValue={100} disabled controls />); expect(container.querySelector(...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/index.test.tsx
components/input-number/__tests__/index.test.tsx
import React from 'react'; import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons'; import InputNumber from '..'; import focusTest from '../../../tests/shared/focusTest'; import mountTest from '../../../tests/shared/mountTest'; import rtlTest from '../../../tests/shared/rtlTest'; import { fireEvent, ren...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/prefix.test.tsx
components/input-number/__tests__/prefix.test.tsx
import React from 'react'; import type { GetRef } from 'antd'; import type { InputNumberProps } from '..'; import InputNumber from '..'; import focusTest from '../../../tests/shared/focusTest'; import { fireEvent, render } from '../../../tests/utils'; type InputNumberRef = GetRef<typeof InputNumber>; describe('prefi...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/image.test.ts
components/input-number/__tests__/image.test.ts
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('InputNumber image', () => { imageDemoTest('input-number'); });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/demo-extend.test.ts
components/input-number/__tests__/demo-extend.test.ts
import { extendTest } from '../../../tests/shared/demoTest'; extendTest('input-number', { skip: ['debug-token.tsx'], });
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/demo.test.tsx
components/input-number/__tests__/demo.test.tsx
import * as React from 'react'; import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest'; demoTest('input-number', { skip: ['debug-token.tsx'], }); rootPropsTest( 'input-number', (InputNumber, props) => <InputNumber {...props} addonBefore="Bamboo" />, { name: 'input-number.addonBefore', ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/style-class.test.tsx
components/input-number/__tests__/style-class.test.tsx
import React from 'react'; import { render } from '../../../tests/utils'; import InputNumber from '../index'; import type { InputNumberProps } from '../index'; describe('InputNumber useMergeSemantic', () => { it('should merge classNames and styles correctly', () => { const { container } = render( <InputNum...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/__tests__/semantic.test.tsx
components/input-number/__tests__/semantic.test.tsx
import React from 'react'; import InputNumber from '..'; import { render } from '../../../tests/utils'; describe('semantic', () => { it('should support classNames and styles', () => { const testClassNames = { root: 'test-root', prefix: 'test-prefix', input: 'test-input', suffix: 'test-su...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/filled-debug.tsx
components/input-number/demo/filled-debug.tsx
import React from 'react'; import { Flex, InputNumber } from 'antd'; const App: React.FC = () => ( <Flex vertical gap={12}> <Flex gap={12}> <InputNumber placeholder="Filled" variant="filled" /> <InputNumber placeholder="Filled" variant="filled" disabled /> <InputNumber placeholder="Filled" vari...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/_semantic.tsx
components/input-number/demo/_semantic.tsx
import React from 'react'; import { InputNumber } from 'antd'; import type { InputNumberProps } from 'antd'; import useLocale from '../../../.dumi/hooks/useLocale'; import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview'; const locales = { cn: { root: '根元素,设置行内块布局、宽度、边框圆角和重置样式', input: '输入...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/presuffix.tsx
components/input-number/demo/presuffix.tsx
import React from 'react'; import { UserOutlined } from '@ant-design/icons'; import { Flex, InputNumber, Space } from 'antd'; const App: React.FC = () => ( <Flex vertical gap="middle"> <InputNumber prefix="¥" style={{ width: '100%' }} /> <Space.Compact block> <Space.Addon> <UserOutlined /> ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/formatter.tsx
components/input-number/demo/formatter.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { InputNumber, Space } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const formatter: InputNumberProps<number>['formatter'] = (value) => { const [start, end] = `${value}`.sp...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/focus.tsx
components/input-number/demo/focus.tsx
import React, { useRef } from 'react'; import type { GetRef } from 'antd'; import { Button, InputNumber, Space } from 'antd'; type InputNumberRef = GetRef<typeof InputNumber>; const App: React.FC = () => { const inputRef = useRef<InputNumberRef>(null); return ( <Space vertical style={{ width: '100%' }}> ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/spinner.tsx
components/input-number/demo/spinner.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { Flex, InputNumber } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const sharedProps = { mode: 'spinner' as const, min: 1, max: 10, defaultValue: 3, onChange, sty...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/render-panel.tsx
components/input-number/demo/render-panel.tsx
import React from 'react'; import { InputNumber } from 'antd'; /** Test usage. Do not use in your production. */ const { _InternalPanelDoNotUseOrYouWillBeFired: InternalInputNumber } = InputNumber; export default () => ( <div style={{ display: 'flex', flexDirection: 'column', rowGap: 16 }}> <InternalInputNumber...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/debug-token.tsx
components/input-number/demo/debug-token.tsx
import React from 'react'; import { ConfigProvider, InputNumber, Space } from 'antd'; export default () => ( <ConfigProvider theme={{ components: { InputNumber: { handleWidth: 50, }, }, }} > <Space wrap> <InputNumber /> <ConfigProvider theme={{...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/variant.tsx
components/input-number/demo/variant.tsx
import React from 'react'; import { Flex, InputNumber } from 'antd'; const App: React.FC = () => ( <Flex vertical gap={12}> <InputNumber placeholder="Outlined" style={{ width: 200 }} /> <InputNumber placeholder="Filled" variant="filled" style={{ width: 200 }} /> <InputNumber placeholder="Borderless" vari...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/disabled.tsx
components/input-number/demo/disabled.tsx
import React, { useState } from 'react'; import { Button, InputNumber } from 'antd'; const App: React.FC = () => { const [disabled, setDisabled] = useState(true); const toggle = () => { setDisabled(!disabled); }; return ( <> <InputNumber min={1} max={10} disabled={disabled} defaultValue={3} /> ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/addon.tsx
components/input-number/demo/addon.tsx
import React from 'react'; import { SettingOutlined } from '@ant-design/icons'; import { Cascader, InputNumber, Select, Space } from 'antd'; const selectBefore = ( <Select defaultValue="add" style={{ width: 60 }} options={[ { label: '+', value: 'add' }, { label: '-', value: 'minus' }, ]} ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/controls.tsx
components/input-number/demo/controls.tsx
import React from 'react'; import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons'; import { InputNumber } from 'antd'; const App: React.FC = () => ( <InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} /> ); export default App;
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/out-of-range.tsx
components/input-number/demo/out-of-range.tsx
import React, { useState } from 'react'; import { Button, InputNumber, Space } from 'antd'; const App: React.FC = () => { const [value, setValue] = useState<string | number | null>('99'); return ( <Space> <InputNumber min={1} max={10} value={value} onChange={setValue} /> <Button type="prim...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/keyboard.tsx
components/input-number/demo/keyboard.tsx
import React, { useState } from 'react'; import { Checkbox, InputNumber, Space } from 'antd'; const App: React.FC = () => { const [keyboard, setKeyboard] = useState(true); return ( <Space> <InputNumber min={1} max={10} keyboard={keyboard} defaultValue={3} /> <Checkbox onChange={() => { ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/status.tsx
components/input-number/demo/status.tsx
import React from 'react'; import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined'; import { InputNumber, Space } from 'antd'; const App: React.FC = () => ( <Space vertical style={{ width: '100%' }}> <InputNumber status="error" style={{ width: '100%' }} /> <InputNumber status="warning" style=...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/digit.tsx
components/input-number/demo/digit.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { InputNumber } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const App: React.FC = () => ( <InputNumber<string> style={{ width: 200 }} defaultValue="1" min="0" ...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/basic.tsx
components/input-number/demo/basic.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { InputNumber } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const App: React.FC = () => <InputNumber min={1} max={10} defaultValue={3} onChange={onChange} />; export defaul...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/size.tsx
components/input-number/demo/size.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { InputNumber, Space } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const App: React.FC = () => ( <Space wrap> <InputNumber size="large" min={1} max={100000} defaultVal...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/change-on-wheel.tsx
components/input-number/demo/change-on-wheel.tsx
import React from 'react'; import type { InputNumberProps } from 'antd'; import { InputNumber } from 'antd'; const onChange: InputNumberProps['onChange'] = (value) => { console.log('changed', value); }; const onStep: InputNumberProps['onStep'] = (value, info) => { console.log('onStep', value, info); }; const App...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/input-number/demo/style-class.tsx
components/input-number/demo/style-class.tsx
import React from 'react'; import { Flex, InputNumber } from 'antd'; import type { InputNumberProps } from 'antd'; import { createStyles } from 'antd-style'; const useStyle = createStyles(({ token }) => ({ root: { border: `1px solid ${token.colorPrimary}`, borderRadius: 8, width: 200, }, })); const st...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/radio/group.tsx
components/radio/group.tsx
import * as React from 'react'; import { useControlledState } from '@rc-component/util'; import useId from '@rc-component/util/lib/hooks/useId'; import pickAttrs from '@rc-component/util/lib/pickAttrs'; import { clsx } from 'clsx'; import { useOrientation } from '../_util/hooks'; import { ConfigContext } from '../conf...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/radio/radio.tsx
components/radio/radio.tsx
import * as React from 'react'; import RcCheckbox from '@rc-component/checkbox'; import { composeRef } from '@rc-component/util/lib/ref'; import { clsx } from 'clsx'; import { useMergeSemantic } from '../_util/hooks'; import type { SemanticClassNamesType, SemanticStylesType } from '../_util/hooks'; import { devUseWarn...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/radio/interface.ts
components/radio/interface.ts
import type * as React from 'react'; import type { Orientation, SemanticClassNamesType, SemanticStylesType } from '../_util/hooks'; import type { AbstractCheckboxProps } from '../checkbox/Checkbox'; import type { AbstractCheckboxGroupProps } from '../checkbox/Group'; import type { SizeType } from '../config-provider/S...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/radio/index.tsx
components/radio/index.tsx
import Group from './group'; import InternalRadio from './radio'; import Button from './radioButton'; export type { RadioChangeEvent, RadioChangeEventTarget, RadioGroupButtonStyle, RadioGroupContextProps, RadioGroupOptionType, RadioGroupProps, RadioProps, RadioRef, } from './interface'; export { Button...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false
ant-design/ant-design
https://github.com/ant-design/ant-design/blob/283b2822e0c371d083a1eaf51cfb1120c5cc4ffe/components/radio/radioButton.tsx
components/radio/radioButton.tsx
import * as React from 'react'; import type { AbstractCheckboxProps } from '../checkbox/Checkbox'; import { ConfigContext } from '../config-provider'; import { RadioOptionTypeContextProvider } from './context'; import type { RadioChangeEvent, RadioRef } from './interface'; import Radio from './radio'; export type Rad...
typescript
MIT
283b2822e0c371d083a1eaf51cfb1120c5cc4ffe
2026-01-04T15:25:31.760576Z
false