message: feat: split and export switch baseStyle
diff: import { mode, multiStyleConfig } from "@chakra-ui/theme-tools"
  -const Switch = multiStyleConfig({
  - parts: {
  +const parts = {
  track: "the switch outer track",
  thumb: "the switch inner circle",
  - },
  - baseStyle: function (props) {
  +}
  +
  +// @ts-ignore
  +const baseStyleTrack = function (props) {
  const { colorScheme: c } = props
  +
  return {
  - track: {
  borderRadius: "full",
  p: "2px",
  transition: "all 120ms",
  @@ -23,17 +24,23 @@ const Switch = multiStyleConfig({
  _checked: {
  bg: mode(`${c}.500`, `${c}.200`)(props),
  },
  - },
  - thumb: {
  + }
  +}
  +
  +const baseStyleThumb = {
  bg: "white",
  transition: "transform 250ms",
  borderRadius: "full",
  transform: "translateX(0)",
  - },
  }
  - },
  - sizes: {
  +// @ts-ignore
  +const baseStyle = (props) => ({
  + track: baseStyleTrack(props),
  + thumb: baseStyleThumb,
  +})
  +
  +const sizes = {
  sm: {
  track: {
  w: "1.375rem",
  @@ -75,12 +82,27 @@ const Switch = multiStyleConfig({
  },
  },
  },
  - },
  +}
  - defaultProps: {
  +const defaultProps = {
  size: "md",
  colorScheme: "blue",
  - },
  +}
  +
  +const Switch = multiStyleConfig({
  + parts,
  + baseStyle,
  + sizes,
  + // @ts-ignore
  + defaultProps,
  })
  +export const switchStyles = {
  + parts,
  + baseStyleThumb,
  + baseStyleTrack,
  + sizes,
  + defaultProps,
  +}
  +
  export default Switch
  