fix(162): added forwardRef Card (#216)

This commit is contained in:
Priscila Oliveira 2019-10-26 08:44:25 +02:00 committed by Juan Picado @jotadeveloper
parent ade548a7da
commit 2bc49f3ab7
6 changed files with 15 additions and 4 deletions

View File

@ -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)({
'&&': { '&&': {

View File

@ -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';

View File

@ -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)({
'&&': { '&&': {

View File

@ -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',

View 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;

View File

@ -0,0 +1 @@
export { default } from './Card';