File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
packages/app/src/app/pages/common/Modals/ShareModal2 Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- import styled from 'styled-components' ;
1+ import styled , {
2+ StyledComponent ,
3+ StyledComponentInnerOtherProps ,
4+ } from 'styled-components' ;
25import css from '@styled-system/css' ;
36
47export const Container = styled . div (
@@ -109,13 +112,17 @@ export const Input = styled.input<{ code?: boolean }>(({ code }) =>
109112 } )
110113) ;
111114
112- export const TextArea = styled ( Input ) (
115+ export const TextArea = styled ( Input ) . attrs ( { as : 'textarea' } ) (
113116 css ( {
114117 height : 'auto' , // let rows attr take care of height
115118 lineHeight : 1.6 ,
116119 marginBottom : 2 ,
117120 } )
118- ) ;
121+ ) as StyledComponent <
122+ 'textarea' ,
123+ any ,
124+ StyledComponentInnerOtherProps < typeof Input >
125+ > ;
119126
120127export const Button = styled . button (
121128 css ( {
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ function ShareModal() {
122122 } ;
123123
124124 /** Copy Embed code */
125- const urlContainer = React . useRef ( ) ;
125+ const urlContainer = React . useRef < HTMLInputElement | null > ( null ) ;
126126 const [ copied , setCopied ] = React . useState ( false ) ;
127127
128128 const copyEmbedCode = ( ) => {
@@ -256,9 +256,8 @@ function ShareModal() {
256256 </ Section >
257257 < SectionBody >
258258 < TextArea
259- as = "textarea"
260259 code
261- rows = "5"
260+ rows = { 5 }
262261 readOnly
263262 value = { getUrl ( settings , darkMode ) }
264263 ref = { urlContainer }
You can’t perform that action at this time.
0 commit comments