feat(TextComponent): enhance text styling with dynamic font weights and improved layout
- Updated Text component to support dynamic font weights, allowing for more flexible text styling. - Refactored variant styles to utilize new font weight constants for better consistency across text variants. - Introduced letter spacing adjustments for improved readability and visual appeal. - Added font family configuration for iOS and Android to optimize typography across platforms.
This commit is contained in:
@@ -2,6 +2,39 @@
|
||||
* 与明暗无关的设计 token
|
||||
*/
|
||||
|
||||
// 字体配置 - 使用系统字体栈,优化字重
|
||||
export const fontFamily = {
|
||||
// iOS 系统字体
|
||||
ios: {
|
||||
regular: 'System',
|
||||
medium: 'System',
|
||||
semibold: 'System',
|
||||
bold: 'System',
|
||||
},
|
||||
// Android 系统字体
|
||||
android: {
|
||||
regular: 'Roboto',
|
||||
medium: 'Roboto',
|
||||
semibold: 'Roboto',
|
||||
bold: 'Roboto',
|
||||
},
|
||||
// 通用字体栈
|
||||
system: {
|
||||
regular: 'System',
|
||||
medium: 'System',
|
||||
semibold: 'System',
|
||||
bold: 'System',
|
||||
},
|
||||
};
|
||||
|
||||
// 字体字重 - 使用数值更精确控制
|
||||
export const fontWeights = {
|
||||
regular: '400' as const,
|
||||
medium: '500' as const,
|
||||
semibold: '600' as const,
|
||||
bold: '700' as const,
|
||||
};
|
||||
|
||||
export const fontSizes = {
|
||||
xs: 10,
|
||||
sm: 12,
|
||||
|
||||
Reference in New Issue
Block a user