mirror of
https://github.com/vercel/commerce.git
synced 2025-07-07 21:31:22 +00:00
✨ feat: Heading Common
This commit is contained in:
parent
bef4bbfad0
commit
3a0cb30b78
@ -3,19 +3,19 @@ import classNames from 'classnames'
|
|||||||
import s from './HeadingCommon.module.scss'
|
import s from './HeadingCommon.module.scss'
|
||||||
|
|
||||||
interface HeadingCommonProps {
|
interface HeadingCommonProps {
|
||||||
headingType?: 'highlight' | 'light' | 'default';
|
type?: 'highlight' | 'light' | 'default';
|
||||||
textAlign?: 'center' | 'left';
|
align?: 'center' | 'left';
|
||||||
headingText?: string;
|
children: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HeadingCommon = ({ headingType='default', textAlign='left', headingText='categories' }: HeadingCommonProps) => {
|
const HeadingCommon = ({ type='default', align='left', children }: HeadingCommonProps) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(s.headingCommon, {
|
<div className={classNames(s.headingCommon, {
|
||||||
[s[`${headingType}`]]: headingType,
|
[s[type]]: type,
|
||||||
[s[`${textAlign}`]]: textAlign
|
[s[align]]: align
|
||||||
})}
|
})}
|
||||||
>{headingText}</div>
|
>{children}</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user