forked from jdf2e/nutui-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(indicator): demo拆解与规范 (jdf2e#2090)
- Loading branch information
Showing
14 changed files
with
328 additions
and
670 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
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,19 @@ | ||
import React from 'react' | ||
import { Indicator, Cell } from '@nutui/nutui-react' | ||
|
||
const Demo1 = () => { | ||
return ( | ||
<> | ||
<Cell> | ||
<Indicator total={3} current={0} /> | ||
</Cell> | ||
<Cell> | ||
<Indicator total={3} current={1} /> | ||
</Cell> | ||
<Cell> | ||
<Indicator total={3} current={2} /> | ||
</Cell> | ||
</> | ||
) | ||
} | ||
export default Demo1 |
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,30 @@ | ||
import React from 'react' | ||
import { Indicator, Cell } from '@nutui/nutui-react' | ||
|
||
const Demo2 = () => { | ||
return ( | ||
<Cell> | ||
<Indicator total={6} current={5}> | ||
<div | ||
style={{ | ||
display: 'inline-block', | ||
width: '14px', | ||
height: '14px', | ||
lineHeight: '14px', | ||
textAlign: 'center', | ||
fontSize: '12px', | ||
color: '#FFFFFF', | ||
border: '1px solid #FFFFFF', | ||
borderRadius: '50%', | ||
margin: '4px', | ||
background: `var(--nutui-color-primary)`, | ||
boxShadow: `0 0 1px 1px var(--nutui-color-primary)`, | ||
}} | ||
> | ||
{5} | ||
</div> | ||
</Indicator> | ||
</Cell> | ||
) | ||
} | ||
export default Demo2 |
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,20 @@ | ||
import React from 'react' | ||
import { Indicator, Cell, ConfigProvider } from '@nutui/nutui-react' | ||
|
||
const customTheme = { | ||
nutuiIndicatorColor: '#3768fa', | ||
nutuiIndicatorDotColor: '#ddd', | ||
nutuiIndicatorDotSize: '8px', | ||
nutuiIndicatorDotActiveSize: '24px', | ||
} | ||
|
||
const Demo3 = () => { | ||
return ( | ||
<Cell> | ||
<ConfigProvider theme={customTheme}> | ||
<Indicator total={6} current={5} /> | ||
</ConfigProvider> | ||
</Cell> | ||
) | ||
} | ||
export default Demo3 |
Oops, something went wrong.