Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8927e23

Browse files
committed
emotion:Paywall
1 parent715282c commit8927e23

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed
Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
importBoxfrom"@mui/material/Box";
22
importChipfrom"@mui/material/Chip";
3-
import{makeStyles}from"@mui/styles";
43
importTypographyfrom"@mui/material/Typography";
4+
import{typeFC,typeReactNode}from"react";
5+
import{typeInterpolation,typeTheme}from"@emotion/react";
56
import{Stack}from"components/Stack/Stack";
6-
import{FC,ReactNode}from"react";
77

88
exportinterfacePaywallProps{
99
message:string;
@@ -13,17 +13,16 @@ export interface PaywallProps {
1313

1414
exportconstPaywall:FC<React.PropsWithChildren<PaywallProps>>=(props)=>{
1515
const{ message, description, cta}=props;
16-
conststyles=useStyles();
1716

1817
return(
19-
<BoxclassName={styles.root}>
20-
<divclassName={styles.header}>
18+
<Boxcss={styles.root}>
19+
<divcss={styles.header}>
2120
<Stackdirection="row"alignItems="center"justifyContent="center">
22-
<Typographyvariant="h5"className={styles.title}>
21+
<Typographyvariant="h5"css={styles.title}>
2322
{message}
2423
</Typography>
2524
<Chip
26-
className={styles.enterpriseChip}
25+
css={styles.enterpriseChip}
2726
label="Enterprise"
2827
size="small"
2928
color="primary"
@@ -34,7 +33,7 @@ export const Paywall: FC<React.PropsWithChildren<PaywallProps>> = (props) => {
3433
<Typography
3534
variant="body2"
3635
color="textSecondary"
37-
className={styles.description}
36+
css={styles.description}
3837
>
3938
{description}
4039
</Typography>
@@ -45,8 +44,8 @@ export const Paywall: FC<React.PropsWithChildren<PaywallProps>> = (props) => {
4544
);
4645
};
4746

48-
constuseStyles=makeStyles((theme)=>({
49-
root:{
47+
conststyles={
48+
root:(theme)=>({
5049
display:"flex",
5150
flexDirection:"column",
5251
justifyContent:"center",
@@ -57,24 +56,24 @@ const useStyles = makeStyles((theme) => ({
5756
backgroundColor:theme.palette.background.paper,
5857
border:`1px solid${theme.palette.divider}`,
5958
borderRadius:theme.shape.borderRadius,
60-
},
61-
header:{
59+
}),
60+
header:(theme)=>({
6261
marginBottom:theme.spacing(3),
63-
},
62+
}),
6463
title:{
6564
fontWeight:600,
6665
fontFamily:"inherit",
6766
},
68-
description:{
67+
description:(theme)=>({
6968
marginTop:theme.spacing(1),
7069
fontFamily:"inherit",
7170
maxWidth:420,
7271
lineHeight:"160%",
73-
},
74-
enterpriseChip:{
72+
}),
73+
enterpriseChip:(theme)=>({
7574
background:theme.palette.success.dark,
7675
color:theme.palette.success.contrastText,
7776
border:`1px solid${theme.palette.success.light}`,
7877
fontSize:13,
79-
},
80-
}));
78+
}),
79+
}satisfiesRecord<string,Interpolation<Theme>>;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp