Commit e5fb22ef authored by Chunchi Che's avatar Chunchi Che

make OptionModal pretty

parent ec810a55
Pipeline #28878 passed with stages
in 9 minutes and 52 seconds
.container {
:global(.ant-pro-checkcard-header) {
font-family: var(--theme-font);
font-size: 2rem;
display: flex;
align-items: center;
justify-content: center;
}
:global(.ant-pro-checkcard) {
background-color: #1414142b;
}
:global(.ant-pro-checkcard-checked) {
&::before {
position: absolute;
width: 100%;
height: 100%;
content: "";
z-index: 1;
background-color: #0023bf32;
box-shadow: 0 0 0 1px #0087e6 inset;
}
&::after {
display: none;
}
}
.check-card {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.625rem;
}
}
......@@ -16,6 +16,7 @@ import { Container } from "@/container";
import { getUIContainer } from "@/container/compat";
import { NeosModal } from "../NeosModal";
import styles from "./index.module.scss";
type Options = { info: string; response: number }[];
......@@ -67,35 +68,32 @@ export const OptionModal = () => {
{grouped.map(
(options, i) =>
i === page && (
<CheckCard.Group
key={i}
bordered
multiple
value={selecteds[i]}
style={{
display: "grid",
gridTemplateColumns: "repeat(2, 1fr)",
gap: "0.625rem",
}}
onChange={(values: any) => {
const v = selecteds.map((x, i) => (i === page ? values : x));
setSelecteds(v);
}}
>
{options.map((option, idx) => (
<CheckCard
key={idx}
style={{
width: "12.5rem",
fontSize: "1rem",
marginInlineEnd: 0,
marginBlockEnd: 0,
}}
title={option.info}
value={option.response}
/>
))}
</CheckCard.Group>
<div className={styles.container} key={i}>
<CheckCard.Group
bordered
multiple
value={selecteds[i]}
className={styles["check-card"]}
onChange={(values: any) => {
const v = selecteds.map((x, i) => (i === page ? values : x));
setSelecteds(v);
}}
>
{options.map((option, idx) => (
<CheckCard
key={idx}
style={{
width: "12.5rem",
fontSize: "1rem",
marginInlineEnd: 0,
marginBlockEnd: 0,
}}
title={option.info}
value={option.response}
/>
))}
</CheckCard.Group>
</div>
),
)}
</NeosModal>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment