-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
c9421a6
commit 0f91de2
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/berlin/src/components/textarea/Textarea.styled.tsx
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,15 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const StyledTextarea = styled.textarea` | ||
background-color: var(--color-white); | ||
border-radius: 0.5rem; | ||
border: 1px solid var(--color-black); | ||
height: 12rem; | ||
padding: 0.75rem 1rem; | ||
resize: none; | ||
width: 100%; | ||
&:disabled { | ||
cursor: not-allowed; | ||
} | ||
`; |
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,22 @@ | ||
// Components | ||
import { FlexColumn } from '../containers/FlexColum.styled'; | ||
import Label from '../typography/Label'; | ||
|
||
// Styled Components | ||
import { StyledTextarea } from './Textarea.styled'; | ||
|
||
type TextareaProps = { | ||
label: string; | ||
$required?: boolean; | ||
}; | ||
|
||
function Textarea({ label, $required, ...props }: TextareaProps) { | ||
return ( | ||
<FlexColumn> | ||
{label && <Label $required={$required}>{label}</Label>} | ||
<StyledTextarea {...props} /> | ||
</FlexColumn> | ||
); | ||
} | ||
|
||
export default Textarea; |
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 @@ | ||
export { default } from './Textarea'; |