feat: Heading Common

This commit is contained in:
quocsonnguyen
2021-08-25 15:09:39 +07:00
parent ce3efdce7d
commit 9ad9d33fb9
7 changed files with 16870 additions and 4734 deletions

View File

@@ -0,0 +1,19 @@
@import '../../../styles/utilities';
.headingCommon {
@apply heading-1 font-heading uppercase text-left spacing-horizontal-left;
&.highlight {
color: var(--negative);
}
&.light {
color: var(--disabled);
}
&.center {
@apply text-center
}
@screen md {
@apply spacing-horizontal;
}
}

View File

@@ -0,0 +1,23 @@
import React from 'react'
import classNames from 'classnames'
import s from './HeadingCommon.module.scss'
interface HeadingCommonProps {
headingType?: 'highlight' | 'light' | 'default';
textAlign?: 'center' | 'left';
headingText?: string;
}
const HeadingCommon = ({ headingType='default', textAlign='left', headingText='categories' }: HeadingCommonProps) => {
return (
<div className={classNames(s.headingCommon, {
[s[`${headingType}`]]: headingType,
[s[`${textAlign}`]]: textAlign
})}
>{headingText}</div>
)
}
export default HeadingCommon

View File

@@ -8,3 +8,4 @@ export { default as ViewAllItem} from './ViewAllItem/ViewAllItem'
export { default as ItemWishList} from './ItemWishList/ItemWishList'
export { default as Logo} from './Logo/Logo'
export { default as Inputcommon} from './InputCommon/InputCommon'
export { default as HeadingCommon } from './HeadingCommon/HeadingCommon'