Skip to content

Commit

Permalink
Change the cover margin calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
namti committed Feb 6, 2024
1 parent 0b99d71 commit cd9c293
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Book/Book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const Book: React.FC<PropsWithChildren<BookProps>> = (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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Book/Book.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cd9c293

Please sign in to comment.