-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from 'styled-components'; | ||
import { ThemeVariantValueOptions } from '@uiw/utils'; | ||
|
||
export interface FormStyleProps extends ThemeVariantValueOptions {} | ||
|
||
export const FormWarp = styled.form<FormStyleProps>``; | ||
|
||
export const Fieldset = styled.fieldset` | ||
margin: 0; | ||
padding: 0; | ||
border-width: 0; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import styled, { css } from 'styled-components'; | ||
import { HTMLInputProps, ThemeVariantValueOptions } from '@uiw/utils'; | ||
import { InputBase } from '@uiw/react-input'; | ||
import { SelectWarp } from '@uiw/react-select'; | ||
import { TextareaWarp } from '@uiw/react-textarea'; | ||
|
||
interface ParentDivProps extends HTMLInputProps, ThemeVariantValueOptions { | ||
hasError?: boolean; | ||
} | ||
|
||
export const LabelStyle = styled.label` | ||
line-height: 32px; | ||
min-height: 32px; | ||
font-weight: 600; | ||
font-size: 14px; | ||
padding-right: 5px; | ||
label { | ||
display: inline-block; | ||
} | ||
`; | ||
|
||
export const HelpStyle = styled.div` | ||
color: #c2c2c2; | ||
font-size: 12px; | ||
padding-top: 3px; | ||
`; | ||
export const RowStyle = styled.div` | ||
align-items: center; | ||
display: flex; | ||
`; | ||
|
||
export const ParentDiv = styled.div<ParentDivProps>` | ||
margin-bottom: 10px; | ||
${(props) => | ||
props.hasError && | ||
css` | ||
${InputBase},${SelectWarp},${TextareaWarp} { | ||
box-shadow: 0 0 0 1px #dc3545, 0 0 0 3px rgba(220, 53, 69, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2); | ||
&:hover { | ||
box-shadow: 0 0 0 1px #dc3545, 0 0 0 3px rgba(220, 53, 69, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2); | ||
} | ||
&:focus, | ||
&:hover { | ||
box-shadow: 0 0 0 1px #dc3545, 0 0 0 3px rgba(220, 53, 69, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2); | ||
} | ||
} | ||
${LabelStyle}, ${HelpStyle} { | ||
color: #dc3545; | ||
} | ||
`} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters