import styled from 'styled-components'; export const Wrapper = styled.label<{ disabled?: boolean }>` align-self: center; position: relative; display: inline-block; width: 32px; height: 18px; input { display: none; &:checked + span:last-of-type { background-color: ${({ theme, disabled }) => disabled ? theme.colors.neutral[50] : theme.colors.primary[700]}; outline: ${({ theme, disabled }) => disabled ? `1px solid ${theme.colors.neutral[400]}` : 'none'}; } &:checked + span:last-of-type:before { transform: translateX(14px); background-color: ${({ theme, disabled }) => disabled ? theme.colors.neutral[400] : theme.colors.neutral[0]}; } } span:last-of-type { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0px 1px 4px rgba(0, 0, 0, 0.08); background-color: ${({ theme }) => theme.colors.neutral[200]}; transition: 0.2s; border-radius: 40px; &:before { position: absolute; content: ''; height: 14px; width: 14px; left: 2px; bottom: 2px; transition: 0.2s; border-radius: 50%; box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.08); background-color: ${({ theme }) => theme.colors.neutral[0]}; } } `;