mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update text area component
This commit is contained in:
@@ -49,13 +49,15 @@ const TextArea = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className='textarea'>
|
<div className='textarea'>
|
||||||
<textarea
|
<div>
|
||||||
rows={10}
|
<textarea
|
||||||
value={value}
|
rows={10}
|
||||||
name={name}
|
value={value}
|
||||||
onChange={onChange}
|
name={name}
|
||||||
placeholder={placeholder}
|
onChange={onChange}
|
||||||
/>
|
placeholder={placeholder}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,32 +23,20 @@ export const Wrapper = styled.div<WrapperProps>`
|
|||||||
width: inherit;
|
width: inherit;
|
||||||
height: inherit;
|
height: inherit;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 1rem;
|
padding: 2px;
|
||||||
position: relative;
|
|
||||||
color: ${({ theme }) => theme.colors.black.main};
|
color: ${({ theme }) => theme.colors.black.main};
|
||||||
background: ${({ theme }) => theme.colors.white.main};
|
|
||||||
background-clip: padding-box;
|
|
||||||
border: 2px solid transparent;
|
|
||||||
|
|
||||||
&:before {
|
div {
|
||||||
content: '';
|
background: ${({ theme }) => theme.colors.white.main};
|
||||||
position: absolute;
|
padding: 1rem;
|
||||||
top: 0;
|
border-radius: 5px;
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: inherit;
|
|
||||||
height: inherit;
|
|
||||||
z-index: -1;
|
|
||||||
margin: -2px;
|
|
||||||
border-radius: inherit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: 1fr auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
@@ -78,61 +66,61 @@ export const Wrapper = styled.div<WrapperProps>`
|
|||||||
switch (color) {
|
switch (color) {
|
||||||
case 'client':
|
case 'client':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.client.light};
|
background: ${theme.colors.client.light};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'productOwner':
|
case 'productOwner':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.productOwner.light};
|
background: ${theme.colors.productOwner.light};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'developer':
|
case 'developer':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.developer.light};
|
background: ${theme.colors.developer.light};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'admin':
|
case 'admin':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.admin.light};
|
background: ${theme.colors.admin.light};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'success':
|
case 'success':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.success.main};
|
background: ${theme.colors.success.main};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'warning':
|
case 'warning':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.warning.main};
|
background: ${theme.colors.warning.main};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'error':
|
case 'error':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.error.main};
|
background: ${theme.colors.error.main};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'black':
|
case 'black':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.black.main};
|
background: ${theme.colors.black.main};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
case 'white':
|
case 'white':
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.white.main};
|
background: ${theme.colors.white.main};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
default:
|
default:
|
||||||
return css`
|
return css`
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.client.light};
|
background: ${theme.colors.client.light};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -148,7 +136,7 @@ export const Wrapper = styled.div<WrapperProps>`
|
|||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea:before {
|
.textarea {
|
||||||
background: ${theme.colors.error.main};
|
background: ${theme.colors.error.main};
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
|||||||
Reference in New Issue
Block a user