diff --git a/src/components/Book/Book.tsx b/src/components/Book/Book.tsx index 3b79bbf..129e817 100644 --- a/src/components/Book/Book.tsx +++ b/src/components/Book/Book.tsx @@ -138,7 +138,7 @@ const Book: React.FC> = (props): React.JSX.Element '--crease-margin': ((wrapperSize?.width || 0) * (props.creaseMargin ?? defaults.creaseMargin)).toFixed(2) + 'px', '--crease-width': ((wrapperSize?.width || 0) * (props.creaseWidth ?? defaults.creaseWidth)).toFixed(2) + 'px', '--thickness': ((wrapperSize?.height || 0) * (props.thickness ?? defaults.thickness)).toFixed(2) + 'px', - '--cover-margin': ((wrapperSize?.height || 0) * (props.coverMargin ?? defaults.coverMargin)).toFixed(2) + 'px', + '--cover-margin': ((wrapperSize?.width || 0) * (props.coverMargin ?? defaults.coverMargin)).toFixed(2) + 'px', '--fallback-color': props.coverColor, '--transition-duration': props.transitionDuration, diff --git a/src/components/Book/Book.types.ts b/src/components/Book/Book.types.ts index de3806f..6501a80 100644 --- a/src/components/Book/Book.types.ts +++ b/src/components/Book/Book.types.ts @@ -27,7 +27,7 @@ export interface BookProps { */ thickness?: number; /** - * Cover margin, relative to the height of the book. `0` - `1` + * Cover margin, relative to the width of the book. `0` - `1` */ coverMargin?: number;