forked from sombochea/verdaccio-ui
refactor(162): introduced forwardRefDivider (#218)
This commit is contained in:
parent
52ed8ad67b
commit
a38b93e127
@ -1,10 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import Divider from '@material-ui/core/Divider';
|
||||
|
||||
import Package from '../Package';
|
||||
import Help from '../Help';
|
||||
import { formatLicense } from '../../utils/package';
|
||||
import { PackageInterface } from '../Package/Package';
|
||||
import Divider from '../../muiComponents/Divider';
|
||||
|
||||
import * as classes from './styles';
|
||||
|
||||
|
10
src/muiComponents/Divider/Divider.tsx
Normal file
10
src/muiComponents/Divider/Divider.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
import { default as MaterialUIDivider, DividerProps } from '@material-ui/core/Divider';
|
||||
|
||||
type DividerRef = keyof HTMLElementTagNameMap;
|
||||
|
||||
const Divider = forwardRef<DividerRef, DividerProps>(function Divider(props, ref) {
|
||||
return <MaterialUIDivider {...props} innerRef={ref} />;
|
||||
});
|
||||
|
||||
export default Divider;
|
1
src/muiComponents/Divider/index.ts
Normal file
1
src/muiComponents/Divider/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { default } from './Divider';
|
Loading…
Reference in New Issue
Block a user