@team-monolith/cds 1.61.2 → 1.61.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
export interface BookProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
title?: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
subtitleBold?: string;
|
|
7
7
|
isHidden?: boolean;
|
|
8
8
|
buttons?: React.ReactNode;
|
|
9
9
|
/** 전달하면 controlled component로 애니메이션을 제어할 수 있다 */
|
|
@@ -73,7 +73,7 @@ const CARD_COLOR_PALETTE = (theme) => ({
|
|
|
73
73
|
* @returns
|
|
74
74
|
*/
|
|
75
75
|
function Book(props, ref) {
|
|
76
|
-
const { className, title,
|
|
76
|
+
const { className, title, subtitle, subtitleBold, coverColor, isHidden = false, buttons, open: controlledOpen, onHoverStart, onHoverEnd, onCoverClick, icon, } = props;
|
|
77
77
|
const theme = useTheme();
|
|
78
78
|
const [open, setOpen] = useState(false);
|
|
79
79
|
return (_jsxs(Container, Object.assign({ initial: "closed", animate: (controlledOpen !== undefined ? controlledOpen : open)
|
|
@@ -97,7 +97,9 @@ function Book(props, ref) {
|
|
|
97
97
|
|
|
98
98
|
width: 24px;
|
|
99
99
|
height: 24px;
|
|
100
|
-
` })] })), _jsxs(CoverTexts, Object.assign({ variants: buttons ? textMotion : undefined }, { children: [_jsx(
|
|
100
|
+
` })] })), _jsxs(CoverTexts, Object.assign({ variants: buttons ? textMotion : undefined }, { children: [_jsx(Subtitle, { children: subtitle }), _jsx(Subtitle, Object.assign({ css: css `
|
|
101
|
+
font-weight: 800;
|
|
102
|
+
` }, { children: subtitleBold })), _jsx(CoverTitle, { children: title })] })), _jsx(BookGradient, {}), _jsx(Buttons, Object.assign({ variants: buttonsMotion, onClick: (e) => {
|
|
101
103
|
// Button 클릭 시에도 CoverClick 이벤트가 발생하지 않도록 막습니다.
|
|
102
104
|
e.stopPropagation();
|
|
103
105
|
} }, { children: buttons }))] })), _jsx(Shelf, {})] })));
|
|
@@ -224,7 +226,7 @@ const Hide = styled.div(({ theme }) => css `
|
|
|
224
226
|
|
|
225
227
|
z-index: ${ZINDEX_HIDE};
|
|
226
228
|
`);
|
|
227
|
-
const
|
|
229
|
+
const Subtitle = styled.div(({ theme }) => css `
|
|
228
230
|
color: ${CARD_COLOR_PALETTE(theme).text};
|
|
229
231
|
|
|
230
232
|
/* Default/Label/12px-Md */
|
|
@@ -233,20 +235,6 @@ const Chapter = styled.div(({ theme }) => css `
|
|
|
233
235
|
font-style: normal;
|
|
234
236
|
font-weight: 500;
|
|
235
237
|
line-height: 16px; /* 133.333% */
|
|
236
|
-
|
|
237
|
-
opacity: 0.8;
|
|
238
|
-
`);
|
|
239
|
-
const CourseType = styled.div(({ theme }) => css `
|
|
240
|
-
color: ${CARD_COLOR_PALETTE(theme).text};
|
|
241
|
-
|
|
242
|
-
/* Default/Label/12px-Eb */
|
|
243
|
-
font-family: ${theme.fontFamily.ui};
|
|
244
|
-
font-size: 12px;
|
|
245
|
-
font-style: normal;
|
|
246
|
-
font-weight: 800;
|
|
247
|
-
line-height: 16px; /* 133.333% */
|
|
248
|
-
|
|
249
|
-
opacity: 0.8;
|
|
250
238
|
`);
|
|
251
239
|
const CoverIcon = styled.div(({ theme }) => css `
|
|
252
240
|
position: absolute;
|