Get compilation back to working
This commit is contained in:
parent
2193916fe4
commit
94e3acb9c4
21 changed files with 97 additions and 97 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { useMemo } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import styled from 'styled-components/macro';
|
||||
import v4 from 'uuid/v4';
|
||||
import classNames from 'classnames';
|
||||
import tw from 'twin.macro';
|
||||
|
||||
const ToggleContainer = styled.div`
|
||||
${tw`relative select-none w-12 leading-normal`};
|
||||
|
@ -47,8 +47,8 @@ const Switch = ({ name, label, description, defaultChecked, onChange, children }
|
|||
const uuid = useMemo(() => v4(), []);
|
||||
|
||||
return (
|
||||
<div className={'flex items-center'}>
|
||||
<ToggleContainer className={'flex-none'}>
|
||||
<div css={tw`flex items-center`}>
|
||||
<ToggleContainer css={tw`flex-none`}>
|
||||
{children
|
||||
|| <input
|
||||
id={uuid}
|
||||
|
@ -61,12 +61,15 @@ const Switch = ({ name, label, description, defaultChecked, onChange, children }
|
|||
<label htmlFor={uuid}/>
|
||||
</ToggleContainer>
|
||||
{(label || description) &&
|
||||
<div className={'ml-4 w-full'}>
|
||||
<div css={tw`ml-4 w-full`}>
|
||||
{label &&
|
||||
<label
|
||||
className={classNames('input-dark-label cursor-pointer', { 'mb-0': !!description })}
|
||||
css={[ tw`cursor-pointer`, !!description && tw`mb-0` ]}
|
||||
className={'input-dark-label'}
|
||||
htmlFor={uuid}
|
||||
>{label}</label>
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
}
|
||||
{description &&
|
||||
<p className={'input-help'}>
|
||||
|
|
Reference in a new issue