-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1598 from public-convenience-ltd/add-textarea-to-…
…design-system Add textarea to design system
- Loading branch information
Showing
8 changed files
with
47 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.text-area { | ||
display: block; | ||
width: 100%; | ||
padding: var(--space-2xs); | ||
color: var(--color-blue); | ||
border: 1px solid var(--color-blue); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/design-system/components/TextArea/TextArea.stories.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,14 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import TextArea from './TextArea'; | ||
|
||
const meta: Meta<typeof TextArea> = { | ||
title: 'Design-System/Form Elements/TextArea', | ||
component: TextArea, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Primary: StoryObj<typeof TextArea> = { | ||
render: () => <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,10 @@ | ||
import { ComponentPropsWithoutRef, forwardRef } from 'react'; | ||
|
||
const TextArea = forwardRef< | ||
HTMLTextAreaElement, | ||
ComponentPropsWithoutRef<'textarea'> | ||
>((props, ref) => <textarea className="text-area" ref={ref} {...props} />); | ||
|
||
TextArea.displayName = 'TextArea'; | ||
|
||
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'; |
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
45bc4dd
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:
toiletmap – ./
*.toiletmap.org.uk
toiletmap-public-convenience-ltd.vercel.app
toiletmap-git-main-public-convenience-ltd.vercel.app
www.toiletmap.org.uk
toiletmap.org.uk