- [data-theme="dark"] .site-collapse-custom-collapse .site-collapse-custom-panel {
- background: rgba(255,255,255,0.04);
- border: 0px;
- }
-
diff --git a/components/collapse/demo/custom.tsx b/components/collapse/demo/custom.tsx
index 468da79118..0c525f4e53 100644
--- a/components/collapse/demo/custom.tsx
+++ b/components/collapse/demo/custom.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import { CaretRightOutlined } from '@ant-design/icons';
-import { Collapse } from 'antd';
+import { Collapse, theme } from 'antd';
const { Panel } = Collapse;
@@ -10,23 +10,34 @@ const text = `
it can be found as a welcome guest in many households across the world.
`;
-const App: React.FC = () => (
-
}
- className="site-collapse-custom-collapse"
- >
-
- {text}
-
-
- {text}
-
-
- {text}
-
-
-);
+const App: React.FC = () => {
+ const { token } = theme.useToken();
+
+ const panelStyle = {
+ marginBottom: 24,
+ background: token.colorFillAlter,
+ borderRadius: token.borderRadiusLG,
+ border: 'none',
+ };
+
+ return (
+
}
+ style={{ background: token.colorBgContainer }}
+ >
+
+ {text}
+
+
+ {text}
+
+
+ {text}
+
+
+ );
+};
export default App;