Ringtone app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

62 lines
967 B

  1. import {FC} from 'react';
  2. import styled from 'styled-components';
  3. const Base = styled('div')({
  4. borderRadius: '0.25rem',
  5. position: 'relative',
  6. padding: '1rem',
  7. boxSizing: 'border-box',
  8. '::before': {
  9. content: "''",
  10. position: 'absolute',
  11. top: 0,
  12. left: 0,
  13. width: '100%',
  14. height: '100%',
  15. boxSizing: 'border-box',
  16. borderRadius: 'inherit',
  17. pointerEvents: 'none',
  18. backgroundColor: 'white',
  19. mixBlendMode: 'screen',
  20. opacity: 0.125,
  21. },
  22. '::after': {
  23. content: "''",
  24. position: 'absolute',
  25. top: 0,
  26. left: 0,
  27. width: '100%',
  28. height: '100%',
  29. boxSizing: 'border-box',
  30. borderRadius: 'inherit',
  31. pointerEvents: 'none',
  32. border: '1px solid',
  33. opacity: 0.5,
  34. },
  35. })
  36. const Content = styled('div')({
  37. position: 'relative',
  38. })
  39. type Props = {
  40. className?: string,
  41. }
  42. const Card: FC<Props> = ({
  43. children,
  44. ...etcProps
  45. }) => {
  46. return (
  47. <Base
  48. {...etcProps}
  49. >
  50. <Content>
  51. {children}
  52. </Content>
  53. </Base>
  54. )
  55. }
  56. export default Card