Skip to content

Commit

Permalink
Merge pull request #413 from vrk-kpa/feature/textarea-adjustments
Browse files Browse the repository at this point in the history
[Feature] Textarea adjustments
  • Loading branch information
ketsappi authored Dec 7, 2020
2 parents de3ba04 + c381c40 commit 2fd08c9
Show file tree
Hide file tree
Showing 13 changed files with 367 additions and 341 deletions.
176 changes: 0 additions & 176 deletions src/components/Form/Textarea.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export {
export { Expander, ExpanderProps } from './Expander/Expander';
export { Paragraph, ParagraphProps } from './Paragraph/Paragraph';
export { Text, TextProps } from './Text/Text';
export { Textarea, TextareaProps } from './Form/Textarea';
export { VisuallyHidden } from './Visually-hidden/Visually-hidden';
export { RadioButton, RadioButtonProps } from './Form/RadioButton';
export {
Expand Down
15 changes: 0 additions & 15 deletions src/components/utils/aria.ts

This file was deleted.

31 changes: 10 additions & 21 deletions src/core/Form/Textarea/Textarea.baseStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,14 @@ export const baseStyles = withSuomifiTheme(
display: flex;
flex-direction: column;
color: ${theme.colors.blackBase};
width: 290px;
& .fi-textarea_label {
${font({ theme })('actionElementInnerTextBold')};
color: ${theme.colors.blackBase};
& .fi-label-text_label-span {
margin-bottom: 0;
}
& .fi-textarea_optionalText {
${theme.typography.bodyTextSmall};
}
& .fi-textarea_hintText {
display: block;
color: ${theme.colors.blackBase};
${theme.typography.bodyTextSmall};
word-break: break-word;
& .fi-hint-text {
margin-bottom: 0;
}
& .fi-textarea_textarea-element-container {
Expand Down Expand Up @@ -65,13 +58,9 @@ export const baseStyles = withSuomifiTheme(
}
}
& .fi-textarea_statusText {
& .fi-status-text {
display: block;
margin-top: ${theme.spacing.xxs};
font-size: 14px;
line-height: 18px;
font-weight: 600;
word-break: break-word;
}
&.fi-textarea--disabled {
Expand All @@ -87,11 +76,11 @@ export const baseStyles = withSuomifiTheme(
& .fi-textarea_textarea {
border: 2px solid ${theme.colors.alertBase};
}
& .fi-textarea_statusText {
color: ${theme.colors.alertBase};
}
}
}
&.fi-textarea--full-width {
width: 100%;
}
`,
);
19 changes: 19 additions & 0 deletions src/core/Form/Textarea/Textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,22 @@ import { Textarea } from 'suomifi-ui-components';
</Textarea>
</>;
```

```js
import { Textarea } from 'suomifi-ui-components';

<>
<Textarea labelText="Textarea with 100% width" fullWidth>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis
vestibulum iaculis augue, sit amet tincidunt ipsum.
</Textarea>

<Textarea
labelText="Textarea with fixed width of 250px"
containerProps={{ style: { width: '250px' } }}
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis
vestibulum iaculis augue, sit amet tincidunt ipsum.
</Textarea>
</>;
```
Loading

0 comments on commit 2fd08c9

Please sign in to comment.