1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
vault-frontend/src/components/common/SubTitle/index.tsx
2021-10-04 14:34:15 +07:00

19 lines
542 B
TypeScript

import React, { FC } from 'react';
import { Placeholder } from '~/components/placeholders/Placeholder';
import { DivProps } from '~/utils/types';
import classNames from 'classnames';
import styles from './styles.module.scss';
interface Props extends DivProps {
isLoading?: boolean;
}
const SubTitle: FC<Props> = ({ isLoading, children, ...rest }) => (
<div {...rest} className={classNames(styles.title, rest.className)}>
<Placeholder active={isLoading} loading>
{children}
</Placeholder>
</div>
);
export { SubTitle };