Skip to content
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
3 changes: 0 additions & 3 deletions src/packages/animate/animate.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.nut-animate {
.nut-ani-container {
display: inline-block;
}
/* Animation css */
[class*='nut-animate-'] {
animation-duration: 0.5s;
Expand Down
48 changes: 17 additions & 31 deletions src/packages/animate/demos/h5/demo1.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
import React from 'react'
import { Animate, Button } from '@nutui/nutui-react'
import { Animate, Button, Space } from '@nutui/nutui-react'

const Demo1 = () => {
const style = {
marginBottom: '10px',
}
const Demo = () => {
return (
<>
<div style={style}>
<Animate type="slide-right" action="click">
<Button type="primary">由右向左划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-left" action="click">
<Button type="primary">由左向右划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-top" action="click">
<Button type="primary">由上至下划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-bottom" action="click">
<Button type="primary">由下至上划入</Button>
</Animate>
</div>
</>
<Space direction="vertical">
<Animate type="slide-right" action="click">
<Button type="primary">由右向左划入</Button>
</Animate>
<Animate type="slide-left" action="click">
<Button type="primary">由左向右划入</Button>
</Animate>
<Animate type="slide-top" action="click">
<Button type="primary">由上至下划入</Button>
</Animate>
<Animate type="slide-bottom" action="click">
<Button type="primary">由下至上划入</Button>
</Animate>
</Space>
)
}

export default Demo1
export default Demo
75 changes: 26 additions & 49 deletions src/packages/animate/demos/h5/demo2.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,32 @@
import React from 'react'
import { Animate, Button } from '@nutui/nutui-react'
import { Animate, Button, Space } from '@nutui/nutui-react'

const Demo2 = () => {
const style = {
marginBottom: '10px',
}
const Demo = () => {
return (
<>
<div style={style}>
<Animate type="shake" loop>
<Button type="primary">shake-抖动</Button>
</Animate>
</div>

<div style={style}>
<Animate type="ripple" loop>
<Button type="primary">ripple-心跳</Button>
</Animate>
</div>

<div style={style}>
<Animate type="breath" loop>
<Button type="primary">breath-呼吸灯</Button>
</Animate>
</div>

<div style={style}>
<Animate type="twinkle" loop>
<Button type="primary">twinkle-水波</Button>
</Animate>
</div>

<div style={style}>
<Animate type="flicker" loop>
<Button type="primary">flicker-擦亮</Button>
</Animate>
</div>

<div style={style}>
<Animate type="jump" loop>
<Button type="primary">jump-跳跃</Button>
</Animate>
</div>

<div style={style}>
<Animate type="float" loop>
<Button type="primary">float-漂浮</Button>
</Animate>
</div>
</>
<Space direction="vertical">
<Animate type="shake" loop>
<Button type="primary">shake-抖动</Button>
</Animate>
<Animate type="ripple" loop>
<Button type="primary">ripple-心跳</Button>
</Animate>
<Animate type="breath" loop>
<Button type="primary">breath-呼吸灯</Button>
</Animate>
<Animate type="twinkle" loop>
<Button type="primary">twinkle-水波</Button>
</Animate>
<Animate type="flicker" loop>
<Button type="primary">flicker-擦亮</Button>
</Animate>
<Animate type="jump" loop>
<Button type="primary">jump-跳跃</Button>
</Animate>
<Animate type="float" loop>
<Button type="primary">float-漂浮</Button>
</Animate>
</Space>
)
}

export default Demo2
export default Demo
48 changes: 17 additions & 31 deletions src/packages/animate/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
import React from 'react'
import { Animate, Button } from '@nutui/nutui-react-taro'
import { Animate, Button, Space } from '@nutui/nutui-react-taro'

const Demo1 = () => {
const style = {
marginBottom: '10px',
}
const Demo = () => {
return (
<>
<div style={style}>
<Animate type="slide-right" action="click">
<Button type="primary">由右向左划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-left" action="click">
<Button type="primary">由左向右划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-top" action="click">
<Button type="primary">由上至下划入</Button>
</Animate>
</div>

<div style={style}>
<Animate type="slide-bottom" action="click">
<Button type="primary">由下至上划入</Button>
</Animate>
</div>
</>
<Space direction="vertical">
<Animate type="slide-right" action="click">
<Button type="primary">由右向左划入</Button>
</Animate>
<Animate type="slide-left" action="click">
<Button type="primary">由左向右划入</Button>
</Animate>
<Animate type="slide-top" action="click">
<Button type="primary">由上至下划入</Button>
</Animate>
<Animate type="slide-bottom" action="click">
<Button type="primary">由下至上划入</Button>
</Animate>
</Space>
)
}

export default Demo1
export default Demo
75 changes: 26 additions & 49 deletions src/packages/animate/demos/taro/demo2.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,32 @@
import React from 'react'
import { Animate, Button } from '@nutui/nutui-react-taro'
import { Animate, Button, Space } from '@nutui/nutui-react-taro'

const Demo2 = () => {
const style = {
marginBottom: '10px',
}
const Demo = () => {
return (
<>
<div style={style}>
<Animate type="shake" loop>
<Button type="primary">shake-抖动</Button>
</Animate>
</div>

<div style={style}>
<Animate type="ripple" loop>
<Button type="primary">ripple-心跳</Button>
</Animate>
</div>

<div style={style}>
<Animate type="breath" loop>
<Button type="primary">breath-呼吸灯</Button>
</Animate>
</div>

<div style={style}>
<Animate type="twinkle" loop>
<Button type="primary">twinkle-水波</Button>
</Animate>
</div>

<div style={style}>
<Animate type="flicker" loop>
<Button type="primary">flicker-擦亮</Button>
</Animate>
</div>

<div style={style}>
<Animate type="jump" loop>
<Button type="primary">jump-跳跃</Button>
</Animate>
</div>

<div style={style}>
<Animate type="float" loop>
<Button type="primary">float-漂浮</Button>
</Animate>
</div>
</>
<Space direction="vertical">
<Animate type="shake" loop>
<Button type="primary">shake-抖动</Button>
</Animate>
<Animate type="ripple" loop>
<Button type="primary">ripple-心跳</Button>
</Animate>
<Animate type="breath" loop>
<Button type="primary">breath-呼吸灯</Button>
</Animate>
<Animate type="twinkle" loop>
<Button type="primary">twinkle-水波</Button>
</Animate>
<Animate type="flicker" loop>
<Button type="primary">flicker-擦亮</Button>
</Animate>
<Animate type="jump" loop>
<Button type="primary">jump-跳跃</Button>
</Animate>
<Animate type="float" loop>
<Button type="primary">float-漂浮</Button>
</Animate>
</Space>
)
}

export default Demo2
export default Demo