-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change title * Add unique-names-generator package * Make error messages more readable with emphasis on important part. Prettify. * Add random name generator into popup. Add button to regenerate name. Adjust styles * Scroll window on hover and click, so highlighted line would be in the center of the editor * Add another case for suggestion tooltip
- Loading branch information
Maksim Daunarovich
authored
Jan 27, 2021
1 parent
d4c4ef9
commit 088d2fd
Showing
8 changed files
with
348 additions
and
208 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,48 +1,82 @@ | ||
import styled from "styled-components" | ||
|
||
interface InpubBlockProps { | ||
mb?: string | ||
} | ||
|
||
export const InputBlock = styled.div<InpubBlockProps>` | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: ${({mb = "0"}) => mb}; | ||
` | ||
|
||
export const Label = styled.p` | ||
margin: 0; | ||
font-size: 14px; | ||
margin-bottom: 5px; | ||
color: #000; | ||
`; | ||
|
||
export const Type = styled.span` | ||
font-weight: normal; | ||
color: #3E98EB; | ||
margin-left: 4px; | ||
&:before{ | ||
content: "("; | ||
} | ||
&:after{ | ||
content: ")"; | ||
} | ||
` | ||
|
||
export const Input = styled.input` | ||
border: 1px solid #C4C4C4; | ||
font-size: 14px; | ||
color: #000; | ||
padding: 8px; | ||
width: 100%; | ||
font-weight: bold; | ||
margin-bottom: 5px; | ||
&:last-child{ | ||
margin-bottom: 0; | ||
} | ||
`; | ||
|
||
export const Error = styled.p` | ||
font-size: 12px; | ||
color: red; | ||
`; | ||
import React from 'react' | ||
import styled from "styled-components" | ||
|
||
interface InpubBlockProps { | ||
mb?: string | ||
} | ||
|
||
export const InputBlock = styled.div<InpubBlockProps>` | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: ${({mb = "0"}) => mb}; | ||
position: relative; | ||
` | ||
|
||
export const Label = styled.p` | ||
margin: 0; | ||
font-size: 14px; | ||
margin-bottom: 5px; | ||
color: #000; | ||
`; | ||
|
||
export const Type = styled.span` | ||
font-weight: normal; | ||
color: #3E98EB; | ||
margin-left: 4px; | ||
&:before{ | ||
content: "("; | ||
} | ||
&:after{ | ||
content: ")"; | ||
} | ||
` | ||
|
||
export const Input = styled.input` | ||
border: 1px solid #C4C4C4; | ||
font-size: 14px; | ||
color: #000; | ||
padding: 8px; | ||
width: 100%; | ||
font-weight: bold; | ||
margin-bottom: 5px; | ||
&:last-child{ | ||
margin-bottom: 0; | ||
} | ||
`; | ||
|
||
export const Error = styled.p` | ||
font-size: 12px; | ||
color: red; | ||
`; | ||
|
||
export const InputIconContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
position: absolute; | ||
align-self: center; | ||
right: 0.75em; | ||
bottom: 0.9em; | ||
cursor: pointer; | ||
color: #888; | ||
user-select: none; | ||
&:hover{ | ||
color: #333; | ||
} | ||
`; | ||
|
||
|
||
type InputIconProps = { | ||
onClick?: any, | ||
icon: JSX.Element | ||
} | ||
|
||
export const InputIcon = (props: InputIconProps) => { | ||
const { onClick, icon } = props | ||
return ( | ||
<InputIconContainer onClick={onClick}> | ||
{icon} | ||
</InputIconContainer> | ||
) | ||
} |
Oops, something went wrong.
088d2fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: