Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 添加 Material Design 3 风格自定义样式 #1349

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion docs/guide/demos/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import type { Web3ThemeConfig } from '@ant-design/web3';
import { theme } from 'antd';

export type ThemeValue = 'default' | 'violet' | 'dark' | 'green' | 'pink' | 'retro' | 'win95';
export type ThemeValue =
| 'default'
| 'violet'
| 'dark'
| 'green'
| 'pink'
| 'retro'
| 'win95'
| 'material';

export const customToken: Web3ThemeConfig = {
token: {
Expand Down Expand Up @@ -160,6 +168,37 @@ export const themeList: ThemeSetting[] = [
},
},
},
{
color: '#6750A4',
value: 'material',
name: 'Material Design 3',
buttonType: 'primary',
token: {
token: {
colorPrimary: '#6750a4',
colorBorderBg: '',
colorLink: '#6750a4',
colorBgBase: '#fdfbff',
colorBgContainer: '#fdfbff',
colorBgMask: 'rgba(0, 0, 0, 0.32)',
controlHeight: 40,
},
components: {
Button: {
colorBorder: 'transparent',
colorText: '#6750a4',
colorPrimaryBg: '#6750a4',
primaryShadow: 'none',
dangerShadow: 'none',
defaultShadow: 'none',
},
Modal: {
contentBg: '#fffbfe',
boxShadow: 'none',
},
},
},
},
{
value: 'green',
name: 'Forest green',
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/demos/try-it-out/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const App: React.FC = () => {
}}
defaultValue={defaultRadius}
min={0}
max={16}
max={24}
onChange={setRadius}
/>
</Space>
Expand Down