Skip to content

Commit efd1287

Browse files
authored
docs: 添加 Material Design 3 风格自定义样式 (#1349)
1 parent e66ae31 commit efd1287

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

docs/guide/demos/tokens.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import type { Web3ThemeConfig } from '@ant-design/web3';
22
import { theme } from 'antd';
33

4-
export type ThemeValue = 'default' | 'violet' | 'dark' | 'green' | 'pink' | 'retro' | 'win95';
4+
export type ThemeValue =
5+
| 'default'
6+
| 'violet'
7+
| 'dark'
8+
| 'green'
9+
| 'pink'
10+
| 'retro'
11+
| 'win95'
12+
| 'material';
513

614
export const customToken: Web3ThemeConfig = {
715
token: {
@@ -160,6 +168,37 @@ export const themeList: ThemeSetting[] = [
160168
},
161169
},
162170
},
171+
{
172+
color: '#6750A4',
173+
value: 'material',
174+
name: 'Material Design 3',
175+
buttonType: 'primary',
176+
token: {
177+
token: {
178+
colorPrimary: '#6750a4',
179+
colorBorderBg: '',
180+
colorLink: '#6750a4',
181+
colorBgBase: '#fdfbff',
182+
colorBgContainer: '#fdfbff',
183+
colorBgMask: 'rgba(0, 0, 0, 0.32)',
184+
controlHeight: 40,
185+
},
186+
components: {
187+
Button: {
188+
colorBorder: 'transparent',
189+
colorText: '#6750a4',
190+
colorPrimaryBg: '#6750a4',
191+
primaryShadow: 'none',
192+
dangerShadow: 'none',
193+
defaultShadow: 'none',
194+
},
195+
Modal: {
196+
contentBg: '#fffbfe',
197+
boxShadow: 'none',
198+
},
199+
},
200+
},
201+
},
163202
{
164203
value: 'green',
165204
name: 'Forest green',

docs/guide/demos/try-it-out/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const App: React.FC = () => {
192192
}}
193193
defaultValue={defaultRadius}
194194
min={0}
195-
max={16}
195+
max={24}
196196
onChange={setRadius}
197197
/>
198198
</Space>

0 commit comments

Comments
 (0)