Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
2299e6bf
Unverified
Commit
2299e6bf
authored
Apr 06, 2020
by
Peter Holmberg
Committed by
GitHub
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TextArea: Combine style and classname (#23367)
parent
b1039273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
packages/grafana-ui/src/components/Forms/TextArea/TextArea.tsx
+11
-9
No files found.
packages/grafana-ui/src/components/Forms/TextArea/TextArea.tsx
View file @
2299e6bf
...
@@ -12,16 +12,18 @@ export interface Props extends Omit<HTMLProps<HTMLTextAreaElement>, 'size'> {
...
@@ -12,16 +12,18 @@ export interface Props extends Omit<HTMLProps<HTMLTextAreaElement>, 'size'> {
size
?:
FormInputSize
;
size
?:
FormInputSize
;
}
}
export
const
TextArea
=
React
.
forwardRef
<
HTMLTextAreaElement
,
Props
>
(({
invalid
,
size
=
'auto'
,
...
props
},
ref
)
=>
{
export
const
TextArea
=
React
.
forwardRef
<
HTMLTextAreaElement
,
Props
>
(
const
theme
=
useTheme
();
({
invalid
,
size
=
'auto'
,
className
,
...
props
},
ref
)
=>
{
const
styles
=
getTextAreaStyle
(
theme
,
invalid
);
const
theme
=
useTheme
();
const
styles
=
getTextAreaStyle
(
theme
,
invalid
);
return
(
return
(
<
div
className=
{
inputSizes
()[
size
]
}
>
<
div
className=
{
inputSizes
()[
size
]
}
>
<
textarea
className=
{
styles
.
textarea
}
{
...
props
}
ref=
{
ref
}
/>
<
textarea
{
...
props
}
className=
{
cx
(
styles
.
textarea
,
className
)
}
ref=
{
ref
}
/>
</
div
>
</
div
>
);
);
});
}
);
const
getTextAreaStyle
=
stylesFactory
((
theme
:
GrafanaTheme
,
invalid
=
false
)
=>
{
const
getTextAreaStyle
=
stylesFactory
((
theme
:
GrafanaTheme
,
invalid
=
false
)
=>
{
return
{
return
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment