Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3192 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3192 Rev 3236
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
-
 
2
import {
-
 
3
  Checkbox,
-
 
4
  FormControl,
-
 
5
  FormControlLabel,
-
 
6
  FormHelperText,
-
 
7
  styled
2
import { Checkbox, FormControlLabel, styled } from '@mui/material'
8
} from '@mui/material'
3
import { useController } from 'react-hook-form'
9
import { useController } from 'react-hook-form'
Línea 4... Línea 10...
4
 
10
 
5
const BpIcon = styled('span')(({ theme }) => ({
11
const BpIcon = styled('span')(({ theme }) => ({
6
  borderRadius: '20px',
12
  borderRadius: '20px',
Línea 77... Línea 83...
77
      externalOnChange(event)
83
      externalOnChange(event)
78
    }
84
    }
79
  }
85
  }
Línea 80... Línea 86...
80
 
86
 
-
 
87
  return (
81
  return (
88
    <FormControl error={!!error}>
82
    <FormControlLabel
89
      <FormControlLabel
83
      control={
90
        control={
84
        <Checkbox
91
          <Checkbox
85
          checked={value}
92
            checked={value}
86
          onChange={handleChange}
93
            onChange={handleChange}
87
          icon={<BpIcon />}
94
            icon={<BpIcon />}
88
          checkedIcon={<BpCheckedIcon />}
95
            checkedIcon={<BpCheckedIcon />}
89
          sx={{ padding: 0, ...checkBoxStyles }}
96
            sx={{ padding: 0, ...checkBoxStyles }}
90
          {...props}
97
            {...props}
91
        />
98
          />
92
      }
99
        }
93
      label={label}
-
 
94
      error={!!error}
100
        label={label}
95
      sx={{ margin: 0, gap: ({ spacing }) => spacing(0.5), ...labelStyles }}
101
        sx={{ margin: 0, gap: ({ spacing }) => spacing(0.5), ...labelStyles }}
-
 
102
      />
-
 
103
      {error && <FormHelperText>{error.message}</FormHelperText>}
96
    />
104
    </FormControl>
97
  )
105
  )
Línea 98... Línea 106...
98
}
106
}