-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #476 from KEEPER31337/feature/대출가능여부에_따른_텍스트_및_too…
…ltip_구현_#458 Feature/대출가능여부에 따른 텍스트 및 tooltip 구현 #458
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { Typography } from '@mui/material'; | ||
import Tooltip from '@mui/material/Tooltip'; | ||
|
||
interface BorrowStatusProps { | ||
canBorrow: boolean; | ||
} | ||
|
||
const BorrowStatus = ({ canBorrow }: BorrowStatusProps) => { | ||
return canBorrow ? ( | ||
<Typography className="text-pointBlue">신청 가능 권수 : 1/5</Typography> | ||
) : ( | ||
<Tooltip | ||
title="사서(박소현)에게 반납해주세요." | ||
componentsProps={{ | ||
tooltip: { | ||
sx: { | ||
bgcolor: 'rgba(76, 238, 249, 0.15)', | ||
fontSize: '14px', | ||
}, | ||
}, | ||
}} | ||
placement="top" | ||
> | ||
<Typography className="text-subRed">신청 가능 권 수(5권)을 초과했습니다.</Typography> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default BorrowStatus; |