Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Import resolution problem inside Storybook of cozy-harvest #2715

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions react/Typography/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import MuiTypography from '@material-ui/core/Typography'
import React, { forwardRef } from 'react'

/**
* @typedef TypographyPropTypes
* @property {string} [color] - The color of the text.
* @property {string} [variant] - The variant of the text.
* @property {React.ReactNode} children - The content of the component.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on aurait peut-être pu mettre toutes les props... 🤔 https://v4.mui.com/api/typography/#typography-api


/**
* @type React.ForwardRefRenderFunction<HTMLDivElement, TypographyPropTypes & MuiTypography>
*/
const Typography = forwardRef(({ color, variant, children, ...props }, ref) => {
const madeColor =
color || (variant === 'caption' ? 'textSecondary' : 'textPrimary')
Expand Down