diff --git a/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap index 48236a3d3e..0375753978 100644 --- a/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/auto-complete/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -2728,7 +2728,7 @@ exports[`renders components/auto-complete/demo/style-class.tsx extend context co
({ const stylesObject: AutoCompleteProps['styles'] = { popup: { root: { borderWidth: 1, borderColor: '#1890ff' }, - list: { backgroundColor: '#f9f9f9' }, + list: { backgroundColor: 'rgba(240,240,240, 0.85)' }, + listItem: { color: '#272727' }, }, }; @@ -21,7 +22,8 @@ const stylesFn: AutoCompleteProps['styles'] = ({ props }) => { return { popup: { root: { borderWidth: 1, borderColor: '#ccc' }, - list: { backgroundColor: '#f0f0f0' }, + list: { backgroundColor: 'rgba(240,240,240, 0.85)' }, + listItem: { color: '#272727' }, }, } satisfies AutoCompleteProps['styles']; } diff --git a/components/input-number/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/input-number/__tests__/__snapshots__/demo-extend.test.ts.snap index d585fc05ce..ff5daa977e 100644 --- a/components/input-number/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/input-number/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -4494,7 +4494,7 @@ exports[`renders components/input-number/demo/style-class.tsx extend context cor
{ if (props.size === 'large') { return { root: { - backgroundColor: '#fafafa', + backgroundColor: 'rgba(250,250,250, 0.5)', borderColor: '#722ed1', }, } satisfies InputNumberProps['styles']; diff --git a/components/splitter/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/splitter/__tests__/__snapshots__/demo-extend.test.ts.snap index 1258de0c68..5b284a2dbb 100644 --- a/components/splitter/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/splitter/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1310,7 +1310,7 @@ exports[`renders components/splitter/demo/style-class.tsx extend context correct >
First
@@ -1338,7 +1338,7 @@ exports[`renders components/splitter/demo/style-class.tsx extend context correct >
Second
@@ -1359,7 +1359,6 @@ exports[`renders components/splitter/demo/style-class.tsx extend context correct >
First
@@ -1386,7 +1385,6 @@ exports[`renders components/splitter/demo/style-class.tsx extend context correct >
Second
diff --git a/components/splitter/__tests__/__snapshots__/demo.test.ts.snap b/components/splitter/__tests__/__snapshots__/demo.test.ts.snap index 63cd594659..e9033d0a9e 100644 --- a/components/splitter/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/splitter/__tests__/__snapshots__/demo.test.ts.snap @@ -1293,7 +1293,7 @@ exports[`renders components/splitter/demo/style-class.tsx correctly 1`] = ` >
First
@@ -1321,7 +1321,7 @@ exports[`renders components/splitter/demo/style-class.tsx correctly 1`] = ` >
Second
@@ -1342,7 +1342,6 @@ exports[`renders components/splitter/demo/style-class.tsx correctly 1`] = ` >
First
@@ -1369,7 +1368,6 @@ exports[`renders components/splitter/demo/style-class.tsx correctly 1`] = ` >
Second
diff --git a/components/splitter/demo/style-class.tsx b/components/splitter/demo/style-class.tsx index 064a1edc67..5b9ce5dae6 100644 --- a/components/splitter/demo/style-class.tsx +++ b/components/splitter/demo/style-class.tsx @@ -3,10 +3,12 @@ import { Flex, Splitter, Typography } from 'antd'; import type { SplitterProps } from 'antd'; import { createStyles } from 'antd-style'; -const Desc: React.FC> = (props) => { +const Desc: React.FC> = ( + props, +) => { return ( - + {props.text} @@ -49,10 +51,10 @@ const App: React.FC = () => { - + - + diff --git a/components/transfer/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/transfer/__tests__/__snapshots__/demo-extend.test.ts.snap index 577f69ebcd..c175b49919 100644 --- a/components/transfer/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/transfer/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -11446,8 +11446,7 @@ exports[`renders components/transfer/demo/style-class.tsx extend context correct class="ant-transfer ant-transfer-status-error css-var-test-id" >
({ - section: { backgroundColor: '#fafafa' }, +const useStyles = createStyles(({ token, css }) => ({ + section: { backgroundColor: 'rgba(250,250,250, 0.5)' }, header: { color: token.colorPrimary }, + actions: css` + & button { + background-color: rgba(255,242,232,0.6); + } + `, })); const mockData = Array.from({ length: 20 }).map((_, i) => ({ @@ -17,15 +22,13 @@ const mockData = Array.from({ length: 20 }).map((_, i) => ({ const initialTargetKeys = mockData.filter((item) => Number(item.key) > 10).map((item) => item.key); const stylesObject: TransferProps['styles'] = { - section: { backgroundColor: '#fafafa' }, header: { fontWeight: 'bold' }, - actions: { backgroundColor: '#fff2e8' }, }; const stylesFn: TransferProps['styles'] = (info) => { if (info.props.status === 'warning') { return { - section: { backgroundColor: '#f6ffed', borderColor: '#b7eb8f' }, + section: { backgroundColor: 'rgba(246,255,237, 0.6)', borderColor: '#b7eb8f' }, header: { color: '#8DBCC7', fontWeight: 'normal' }, } satisfies TransferProps['styles']; }