* feat: onboarding ui flow * fix: route naming and auth * fix: clean unused imports * fix: remove react.fc * fix: infra dev remove package.json * fix: remove usefull memoization * fix: button stories * fix: use type instead of interface * fix: remove debug
32 lines
794 B
TypeScript
32 lines
794 B
TypeScript
import styled from '@emotion/styled';
|
|
|
|
type OwnProps = {
|
|
title: string;
|
|
description?: string;
|
|
};
|
|
|
|
const StyledContainer = styled.div`
|
|
display: flex;
|
|
flex-direction: column;
|
|
`;
|
|
|
|
const StyledTitle = styled.span`
|
|
color: ${({ theme }) => theme.font.color.primary};
|
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
|
`;
|
|
|
|
const StyledDescription = styled.span`
|
|
color: ${({ theme }) => theme.font.color.tertiary};
|
|
font-weight: ${({ theme }) => theme.font.weight.regular};
|
|
margin-top: ${({ theme }) => theme.spacing(1)};
|
|
`;
|
|
|
|
export function Section({ title, description }: OwnProps): JSX.Element {
|
|
return (
|
|
<StyledContainer>
|
|
<StyledTitle>{title}</StyledTitle>
|
|
{description && <StyledDescription>{description}</StyledDescription>}
|
|
</StyledContainer>
|
|
);
|
|
}
|