mirror of
https://github.com/vercel/commerce.git
synced 2025-07-07 13:21: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'
|
||||
|
||||
interface HeadingCommonProps {
|
||||
headingType?: 'highlight' | 'light' | 'default';
|
||||
textAlign?: 'center' | 'left';
|
||||
headingText?: string;
|
||||
type?: 'highlight' | 'light' | 'default';
|
||||
align?: 'center' | 'left';
|
||||
children: string;
|
||||
}
|
||||
|
||||
const HeadingCommon = ({ headingType='default', textAlign='left', headingText='categories' }: HeadingCommonProps) => {
|
||||
const HeadingCommon = ({ type='default', align='left', children }: HeadingCommonProps) => {
|
||||
|
||||
return (
|
||||
<div className={classNames(s.headingCommon, {
|
||||
[s[`${headingType}`]]: headingType,
|
||||
[s[`${textAlign}`]]: textAlign
|
||||
[s[type]]: type,
|
||||
[s[align]]: align
|
||||
})}
|
||||
>{headingText}</div>
|
||||
>{children}</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user