Skip to content
2 changes: 1 addition & 1 deletion src/packages/skeleton/demos/h5/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Demo5 = () => {
<div style={{ width: '100%' }}>
<Switch
onChange={(value, event) => changeStatus(value, event)}
style={{ display: 'flex', marginBottom: '8px' }}
style={{ marginBottom: '8px' }}
/>
<Skeleton title animated avatar rows={3} visible={checked}>
<div className="nut-skeleton-content">
Expand Down
16 changes: 11 additions & 5 deletions src/packages/skeleton/demos/taro/demo5.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Avatar, Skeleton, Switch } from '@nutui/nutui-react-taro'
import React, { useState } from 'react'
import { View, Text } from '@tarojs/components'
import pxTransform from '@/utils/px-transform'

const Demo5 = () => {
const [checked, setChecked] = useState(false)
Expand All @@ -14,10 +13,17 @@ const Demo5 = () => {
}
return (
<View style={{ width: '100%' }}>
<Switch
onChange={(value, event: any) => changeStatus(value, event)}
style={{ display: 'flex', marginBottom: pxTransform(8) }}
/>
<View
style={{
display: 'flex',
justifyContent: 'flex-start',
}}
>
<Switch
onChange={(value, event: any) => changeStatus(value, event)}
style={{ marginBottom: 8 }}
/>
</View>
<Skeleton title animated avatar rows={3} visible={checked}>
<View
className="nut-skeleton-content"
Expand Down
2 changes: 1 addition & 1 deletion src/packages/switch/switch.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.nut-switch {
cursor: pointer;
position: relative;
display: flex;
display: inline-flex;
flex-direction: row;
align-items: center;
min-width: $switch-width;
Expand Down
Loading