|
| 1 | +import { styled } from '@mui/material'; |
| 2 | +import { Link, ListItem } from '../../base'; |
| 3 | + |
| 4 | +export const backgroundImg = styled('div')<{ backgroundImage?: string }>( |
| 5 | + ({ backgroundImage }) => ({ |
| 6 | + backgroundImage: backgroundImage ? `url(${backgroundImage})` : 'none', |
| 7 | + backgroundPosition: 'right bottom', |
| 8 | + backgroundSize: 'cover', |
| 9 | + backgroundRepeat: 'no-repeat' |
| 10 | + }) |
| 11 | +); |
| 12 | + |
| 13 | +export const CustomCode = styled('code')(() => ({ |
| 14 | + backgroundColor: '#212121', |
| 15 | + color: '#fff', |
| 16 | + padding: '0.2rem 0.4rem', |
| 17 | + borderRadius: '0.2rem' |
| 18 | +})); |
| 19 | + |
| 20 | +export const List = styled(ListItem)<{ iconSrc?: string }>(({ iconSrc }) => ({ |
| 21 | + listStyleImage: iconSrc ? `url(${iconSrc})` : 'none', |
| 22 | + display: 'flex', |
| 23 | + alignItems: 'flex-start' |
| 24 | +})); |
| 25 | + |
| 26 | +export const CustomLink = styled('a')(({ theme }) => ({ |
| 27 | + color: theme.palette.text.secondary, |
| 28 | + textDecoration: 'none', |
| 29 | + '&:visited': { |
| 30 | + textDecoration: 'none' |
| 31 | + }, |
| 32 | + '&:hover': { |
| 33 | + textDecoration: 'underline' |
| 34 | + }, |
| 35 | + fontWeight: 'bold' |
| 36 | +})); |
| 37 | + |
| 38 | +export const MUILink = styled(Link)(() => ({ |
| 39 | + color: '#455a64', |
| 40 | + textDecoration: 'none', |
| 41 | + '&:visited': { |
| 42 | + textDecoration: 'none' |
| 43 | + }, |
| 44 | + '&:hover': { |
| 45 | + textDecoration: 'none', |
| 46 | + cursor: 'pointer' |
| 47 | + }, |
| 48 | + fontWeight: '600' |
| 49 | +})); |
| 50 | + |
| 51 | +export const CustomLinkDiv = styled('div')(() => ({ |
| 52 | + display: 'block', |
| 53 | + width: '10rem', |
| 54 | + whiteSpace: 'nowrap', |
| 55 | + overflow: 'hidden', |
| 56 | + textOverflow: 'ellipsis' |
| 57 | +})); |
| 58 | + |
| 59 | +export const CustomDisabledLink = styled('a')(() => ({ |
| 60 | + textDecoration: 'none', |
| 61 | + color: '#455a64', |
| 62 | + '&:visited': { |
| 63 | + textDecoration: 'none' |
| 64 | + }, |
| 65 | + opacity: '0.5', |
| 66 | + cursor: 'not-allowed' |
| 67 | +})); |
0 commit comments