From 30dd0fb86f5eb9eaf9a434d466dd090e3773b311 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Wed, 17 Nov 2021 14:29:47 +0330 Subject: [PATCH] migrate ExtensionCard.tsx to Mui 5 (#81) * migrate ExtensionCard.tsx to Mui 5 * fix styling --- src/components/ExtensionCard.tsx | 59 +++++++++++--------------------- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/src/components/ExtensionCard.tsx b/src/components/ExtensionCard.tsx index 16212fc5..dd010ce5 100644 --- a/src/components/ExtensionCard.tsx +++ b/src/components/ExtensionCard.tsx @@ -6,7 +6,6 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import React, { useState } from 'react'; -import makeStyles from '@mui/styles/makeStyles'; import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; import Button from '@mui/material/Button'; @@ -14,35 +13,7 @@ import Avatar from '@mui/material/Avatar'; import Typography from '@mui/material/Typography'; import client from 'util/client'; import useLocalStorage from 'util/useLocalStorage'; - -const useStyles = makeStyles((theme) => ({ - root: { - display: 'flex', - justifyContent: 'space-between', - alignItems: 'center', - padding: 16, - }, - bullet: { - display: 'inline-block', - margin: '0 2px', - transform: 'scale(0.8)', - }, - title: { - fontSize: 14, - }, - pos: { - marginBottom: 12, - }, - icon: { - width: theme.spacing(7), - height: theme.spacing(7), - flex: '0 0 auto', - marginRight: 16, - }, - card: { - margin: '10px', - }, -})); +import { Box } from '@mui/system'; interface IProps { extension: IExtension @@ -67,7 +38,6 @@ export default function ExtensionCard(props: IProps) { const [serverAddress] = useLocalStorage('serverBaseURL', ''); const [useCache] = useLocalStorage('useCache', true); - const classes = useStyles(); const langPress = lang === 'all' ? 'All' : lang.toUpperCase(); function install() { @@ -118,16 +88,27 @@ export default function ExtensionCard(props: IProps) { } return ( - - -
+ + + -
+ {name} @@ -136,12 +117,12 @@ export default function ExtensionCard(props: IProps) { {' '} {versionName} -
-
+ +