-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#727 - PromoBannerV2 - Updates in documentation and new typography to…
…kens (#750) * change the button kinds * changes in spacings * new typography token + docs + usage in PromoV2 * fix for spacing in small promo
- Loading branch information
1 parent
e8738f1
commit 198efd3
Showing
6 changed files
with
81 additions
and
12 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
27 changes: 27 additions & 0 deletions
27
packages/react-components/src/components/Typography/Display.tsx
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as React from 'react'; | ||
|
||
import cx from 'clsx'; | ||
|
||
import styles from './Typography.module.scss'; | ||
|
||
interface IProps { | ||
size?: 'md' | 'sm'; | ||
/** DOM element name that will be rendered */ | ||
as?: string; | ||
/** Optional custom className */ | ||
className?: string; | ||
} | ||
|
||
export const Display: React.FC<React.PropsWithChildren<IProps>> = ({ | ||
as = 'div', | ||
size = 'md', | ||
children, | ||
className, | ||
...props | ||
}) => { | ||
return React.createElement( | ||
as, | ||
{ className: cx(styles[`display-${size}`], className), ...props }, | ||
children | ||
); | ||
}; |
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,2 +1,3 @@ | ||
export { Heading } from './Heading'; | ||
export { Text } from './Text'; | ||
export { Display } from './Display'; |
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