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

chore: use emotion for styling (pt. 8)#10447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 23 commits intomainfromemotional-damage-8
Nov 1, 2023
Merged
Changes from1 commit
Commits
Show all changes
23 commits
Select commitHold shift + click to select a range
b1a8951
emotion: `Sidebar`
aslilacOct 31, 2023
44ff69b
emotion: `CliAuthPageView`
aslilacOct 31, 2023
a87148e
emotion: `AppearanceSettingsPageView`
aslilacOct 31, 2023
42f5b5d
emotion: `NotFoundPage`
aslilacOct 31, 2023
7f3cff2
emotion: `VariableInput`
aslilacOct 31, 2023
aff4560
🧹
aslilacOct 31, 2023
1c519da
emotion: `GroupPage`
aslilacOct 31, 2023
f1cd22e
emotion: `ChartSection`
aslilacOct 31, 2023
c04d181
emotion: `DividerWithText`
aslilacOct 31, 2023
b58f25e
emotion: `HealthPage`
aslilacOct 31, 2023
b94ec5d
emotion: `ExternalAuthPageView`
aslilacOct 31, 2023
641ede7
emotion: `TemplateDocsPage`
aslilacOct 31, 2023
f06631b
emotion: `AuditLogDiff`
aslilacOct 31, 2023
2958685
emotion: `SignInForm`
aslilacOct 31, 2023
9eec598
emotion: `LicenseCard`
aslilacOct 31, 2023
0cbd32b
emotion: `AuditLogRow`
aslilacOct 31, 2023
3cd4cc3
emotion: `ExternalAuthSettingsPageView`
aslilacOct 31, 2023
a872acd
emotion: `AddNewLicensePageView`
aslilacOct 31, 2023
f17fdb1
emotion: `OAuthSignInForm`
aslilacOct 31, 2023
b3accde
emotion: `LoginPageView`
aslilacOct 31, 2023
d84bf88
emotion: `Logs`
aslilacOct 31, 2023
14dcfc8
Merge branch 'main' into emotional-damage-8
aslilacNov 1, 2023
36af836
🧹
aslilacNov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
emotion:ChartSection
  • Loading branch information
@aslilac
aslilac committedOct 31, 2023
commitf1cd22ecff6bb27921e6d42c0d6b50115d42ea8d
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
import { useTheme } from "@emotion/react";
import Paper from "@mui/material/Paper";
import { makeStyles } from "@mui/styles";
import { HTMLProps, ReactNode, FC, PropsWithChildren } from "react";
import { combineClasses } from "utils/combineClasses";
import {
type HTMLProps,
type ReactNode,
type FC,
type PropsWithChildren,
} from "react";

export interface ChartSectionProps {
/**
Expand All@@ -18,44 +22,46 @@ export const ChartSection: FC<PropsWithChildren<ChartSectionProps>> = ({
contentsProps,
title,
}) => {
conststyles =useStyles();
consttheme =useTheme();

return (
<Paper className={styles.root} elevation={0}>
<Paper
css={{
border: `1px solid ${theme.palette.divider}`,
borderRadius: theme.shape.borderRadius,
}}
elevation={0}
>
{title && (
<div className={styles.header}>
<h6 className={styles.title}>{title}</h6>
<div
css={{
alignItems: "center",
display: "flex",
justifyContent: "space-between",
padding: theme.spacing(1.5, 2),
}}
>
<h6
css={{
margin: 0,
fontSize: 14,
fontWeight: 600,
}}
>
{title}
</h6>
{action && <div>{action}</div>}
</div>
)}

<div
{...contentsProps}
className={combineClasses([styles.contents, contentsProps?.className])}
css={{
margin: theme.spacing(2),
}}
>
{children}
</div>
</Paper>
);
};

const useStyles = makeStyles((theme) => ({
root: {
border: `1px solid ${theme.palette.divider}`,
borderRadius: theme.shape.borderRadius,
},
contents: {
margin: theme.spacing(2),
},
header: {
alignItems: "center",
display: "flex",
justifyContent: "space-between",
padding: theme.spacing(1.5, 2),
},
title: {
margin: 0,
fontSize: 14,
fontWeight: 600,
},
}));

[8]ページ先頭

©2009-2025 Movatter.jp