-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple component updates. See release notes v2.2.0
- Loading branch information
1 parent
22eb9dd
commit 2579124
Showing
25 changed files
with
441 additions
and
324 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
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
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 |
---|---|---|
@@ -1,9 +1,23 @@ | ||
import React, { ReactNode } from 'react'; | ||
import React, { forwardRef, ReactNode } from 'react'; | ||
import classNames from 'classnames'; | ||
|
||
export interface TextProps { | ||
children: ReactNode; | ||
className?: string; | ||
} | ||
|
||
export function Text({ children, ...props }: TextProps) { | ||
return <p {...props}>{children}</p>; | ||
} | ||
export const Text = forwardRef<HTMLParagraphElement, TextProps>( | ||
({ children, className, ...props }, ref) => { | ||
const classes = classNames('sui--text', className); | ||
|
||
return ( | ||
<p ref={ref} className={classes} {...props}> | ||
{children} | ||
</p> | ||
); | ||
} | ||
); | ||
|
||
Text.displayName = 'Text'; | ||
|
||
export default Text; |
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
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
Oops, something went wrong.