File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
ui-buttons/src/BaseButton Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class BaseButton extends Component<BaseButtonProps> {
7676 cursor : 'pointer'
7777 } as const
7878
79- ref : Element | null = null
79+ ref : HTMLElement | null = null
8080
8181 componentDidMount ( ) {
8282 this . props . makeStyles ?.( this . makeStylesVariables )
@@ -143,10 +143,10 @@ class BaseButton extends Component<BaseButtonProps> {
143143 }
144144
145145 focus ( ) {
146- this . ref && ( this . ref as HTMLElement ) . focus ( )
146+ this . ref && this . ref . focus ( )
147147 }
148148
149- handleElementRef = ( el : Element | null ) => {
149+ handleElementRef = ( el : HTMLElement | null ) => {
150150 const { elementRef } = this . props
151151
152152 this . ref = el
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ type BaseButtonOwnProps = {
6161 /**
6262 * Provides a reference to the `Button`'s underlying html element.
6363 */
64- elementRef ?: ( element : Element | null ) => void
64+ elementRef ?: ( element : HTMLElement | null ) => void
6565
6666 /**
6767 * The element to render as the component root, `Button` by default.
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ class View extends Component<ViewProps> {
185185
186186 ref : Element | null = null
187187
188- handleElementRef = ( el : Element | null ) => {
188+ handleElementRef = ( el : HTMLElement | null ) => {
189189 if ( typeof this . props . elementRef === 'function' ) {
190190 this . props . elementRef ( el )
191191 }
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ type ViewOwnProps = {
6767 /**
6868 * provides a reference to the underlying html element
6969 */
70- elementRef ?: ( element : Element | null ) => void
70+ elementRef ?: ( element : HTMLElement | null ) => void
7171 /**
7272 * By default the display prop is 'auto', meaning it takes on the
7373 * display rules of the html element it's rendered as (see `as` prop).
You can’t perform that action at this time.
0 commit comments