-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(design): Built-in Inter, Consolas and Helvetica Neue font
- Loading branch information
1 parent
7eaa36c
commit 867a8fb
Showing
13 changed files
with
135 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '*.woff2'; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* 引入 antd/dist/reset.css,以重置基本样式,保证原生元素遵从 antd 规范样式 */ | ||
/* ref: https://ant.design/docs/react/migration-v5-cn#%E6%8A%80%E6%9C%AF%E8%B0%83%E6%95%B4 */ | ||
@import '~antd/dist/reset.css'; | ||
|
||
pre, | ||
code, | ||
kbd, | ||
samp { | ||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React, { useState } from 'react'; | ||
import { ConfigProvider, Divider, Form, Radio, Space, theme, Typography } from '@oceanbase/design'; | ||
|
||
const { Text } = Typography; | ||
|
||
const App: React.FC = () => { | ||
const { token } = theme.useToken(); | ||
const [fontWeight, setFontWeight] = useState('normal'); | ||
return ( | ||
<> | ||
<Form layout="inline" style={{ marginBottom: 24 }}> | ||
<Form.Item label="font weight" required={true}> | ||
<Radio.Group | ||
value={fontWeight} | ||
onChange={e => { | ||
setFontWeight(e.target.value); | ||
}} | ||
> | ||
<Radio.Button value="normal">normal</Radio.Button> | ||
<Radio.Button value="bold">bold</Radio.Button> | ||
</Radio.Group> | ||
</Form.Item> | ||
</Form> | ||
<Space | ||
direction="vertical" | ||
size={24} | ||
style={{ | ||
width: '100%', | ||
backgroundColor: token.colorBgLayout, | ||
textAlign: 'center', | ||
padding: '24px 24px 48px 24px', | ||
fontWeight, | ||
fontSize: 32, | ||
}} | ||
> | ||
<Divider>默认字体</Divider> | ||
<div> | ||
<Text style={{ display: 'block' }}>奥星贝斯设计系统</Text> | ||
<Text>OceanBase Design System</Text> | ||
</div> | ||
<Divider>英文站字体(根据 en 语言设置自动生效)</Divider> | ||
<div> | ||
<ConfigProvider | ||
locale={{ | ||
locale: 'en', | ||
}} | ||
> | ||
<Text>OceanBase Design System</Text> | ||
</ConfigProvider> | ||
</div> | ||
<Divider>代码字体(在 code 标签下自动生效)</Divider> | ||
<Text code>OceanBase Design System</Text> | ||
<Divider>数字字体(需要手动设置)</Divider> | ||
<div | ||
style={{ | ||
fontFamily: 'Helvetica Neue', | ||
}} | ||
> | ||
<div>9876543210</div> | ||
<div>0123456789</div> | ||
</div> | ||
</Space> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters