mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-06 18:12:06 +08:00
修改单选框边距大小
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
|||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
|
||||||
import { Icon } from '../Icon'
|
import { Icon } from '../Icon'
|
||||||
|
import { createStyle } from '@/utils/tools'
|
||||||
import { scaleSizeW } from '@/utils/pixelRatio'
|
import { scaleSizeW } from '@/utils/pixelRatio'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
@ -34,7 +35,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ANIMATION_DURATION = 200
|
const ANIMATION_DURATION = 200
|
||||||
const WIDTH = scaleSizeW(32)
|
const PADDING = scaleSizeW(4)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checkboxes allow the selection of multiple options from a set.
|
* Checkboxes allow the selection of multiple options from a set.
|
||||||
@ -85,7 +86,7 @@ const Checkbox = ({
|
|||||||
accessibilityRole="checkbox"
|
accessibilityRole="checkbox"
|
||||||
accessibilityState={{ disabled, checked }}
|
accessibilityState={{ disabled, checked }}
|
||||||
accessibilityLiveRegion="polite"
|
accessibilityLiveRegion="polite"
|
||||||
style={styles.container}
|
style={{ ...styles.container, padding: PADDING }}
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
allowFontScaling={false}
|
allowFontScaling={false}
|
||||||
@ -109,10 +110,8 @@ const Checkbox = ({
|
|||||||
|
|
||||||
Checkbox.displayName = 'Checkbox'
|
Checkbox.displayName = 'Checkbox'
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = createStyle({
|
||||||
container: {
|
container: {
|
||||||
width: WIDTH,
|
|
||||||
height: WIDTH,
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
// backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
// backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
||||||
|
Reference in New Issue
Block a user