Skip to content

Commit

Permalink
chore(ui): delete default props
Browse files Browse the repository at this point in the history
  • Loading branch information
barsukov committed Aug 29, 2024
1 parent 7f2d0e4 commit f09f38f
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React from "react"

const proseStyles = `
Expand All @@ -18,15 +17,14 @@ export interface FormattedTextProps {
/**
* A very basic layout container with padding.
*/
export const FormattedText = ({ className, children, ...props }: FormattedTextProps) => {
export const FormattedText = ({
className = "", // Default value for className
children = null, // Default value for children
...props
}: FormattedTextProps) => {
return (
<div className={`formatted-text-container ${proseStyles} ${className} `} {...props}>
<div className={`formatted-text-container ${proseStyles} ${className}`} {...props}>
{children}
</div>
)
}

FormattedText.defaultProps = {
className: "",
children: null,
}

0 comments on commit f09f38f

Please sign in to comment.