forked from sombochea/verdaccio-ui
fix(162): added forwardRef Card (#216)
This commit is contained in:
parent
ade548a7da
commit
2bc49f3ab7
@ -1,9 +1,9 @@
|
|||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import Card from '@material-ui/core/Card';
|
|
||||||
import Chip from '@material-ui/core/Chip';
|
import Chip from '@material-ui/core/Chip';
|
||||||
|
|
||||||
import { fontWeight } from '../../utils/styles/sizes';
|
import { fontWeight } from '../../utils/styles/sizes';
|
||||||
import Text from '../../muiComponents/Text';
|
import Text from '../../muiComponents/Text';
|
||||||
|
import Card from '../../muiComponents/Card';
|
||||||
|
|
||||||
export const CardWrap = styled(Card)({
|
export const CardWrap = styled(Card)({
|
||||||
'&&': {
|
'&&': {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React, { ReactElement } from 'react';
|
import React, { ReactElement } from 'react';
|
||||||
import Card from '@material-ui/core/Card';
|
|
||||||
import CardContent from '@material-ui/core/CardContent';
|
import CardContent from '@material-ui/core/CardContent';
|
||||||
|
|
||||||
import { ActionBar } from '../ActionBar/ActionBar';
|
import { ActionBar } from '../ActionBar/ActionBar';
|
||||||
@ -11,6 +10,7 @@ import Install from '../Install';
|
|||||||
import Repository from '../Repository/Repository';
|
import Repository from '../Repository/Repository';
|
||||||
import { DetailContext } from '../../pages/Version';
|
import { DetailContext } from '../../pages/Version';
|
||||||
import List from '../../muiComponents/List';
|
import List from '../../muiComponents/List';
|
||||||
|
import Card from '../../muiComponents/Card';
|
||||||
|
|
||||||
import { TitleListItem, TitleListItemText, PackageDescription, PackageVersion } from './styles';
|
import { TitleListItem, TitleListItemText, PackageDescription, PackageVersion } from './styles';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Card from '@material-ui/core/Card';
|
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
|
|
||||||
import { default as Typography } from '../../muiComponents/Heading';
|
import { default as Typography } from '../../muiComponents/Heading';
|
||||||
|
import Card from '../../muiComponents/Card';
|
||||||
|
|
||||||
export const CardStyled = styled(Card)({
|
export const CardStyled = styled(Card)({
|
||||||
'&&': {
|
'&&': {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { default as MuiCard } from '@material-ui/core/Card';
|
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
|
|
||||||
import { default as Typography } from '../../muiComponents/Heading';
|
import { default as Typography } from '../../muiComponents/Heading';
|
||||||
import List from '../../muiComponents/List';
|
import List from '../../muiComponents/List';
|
||||||
|
import { default as MuiCard } from '../../muiComponents/Card';
|
||||||
|
|
||||||
export const Wrapper = styled('div')({
|
export const Wrapper = styled('div')({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
10
src/muiComponents/Card/Card.tsx
Normal file
10
src/muiComponents/Card/Card.tsx
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import React, { forwardRef } from 'react';
|
||||||
|
import { default as MaterialUICard, CardProps } from '@material-ui/core/Card';
|
||||||
|
|
||||||
|
type CardRef = HTMLDivElement;
|
||||||
|
|
||||||
|
const Card = forwardRef<CardRef, CardProps>(function Card(props, ref) {
|
||||||
|
return <MaterialUICard {...props} ref={ref} />;
|
||||||
|
});
|
||||||
|
|
||||||
|
export default Card;
|
1
src/muiComponents/Card/index.ts
Normal file
1
src/muiComponents/Card/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export { default } from './Card';
|
Loading…
Reference in New Issue
Block a user