Skip to content

Commit

Permalink
Merge pull request #21 from MargoMarm/feature/discription
Browse files Browse the repository at this point in the history
Feature/discription
  • Loading branch information
MargoMarm committed Sep 17, 2023
2 parents de6b485 + f8fe101 commit 001610d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/assets/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/components/DiscriptionText/DescriptionText.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import PropTypes from 'prop-types';
import { Container, Text, Icon } from './DescriptionText.styled';
import sprite from '../../assets/sprite.svg';

const DescriptionText = ({ text }) => {
return (
<Container>
<Icon>
<use href={sprite + `#icon-exclamation-mark`}></use>
</Icon>
<Text>{text}</Text>;
</Container>
);
};

DescriptionText.propTypes = {
text: PropTypes.string,
};

export default DescriptionText;
33 changes: 33 additions & 0 deletions src/components/DiscriptionText/DescriptionText.styled.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import styled from '@emotion/styled';
import { colors, mq } from '../../utils';

export const Container = styled.div`
display: flex;
gap: 8px;
width: 335px;
${mq.tablet} {
width: 439px;
}
`;

export const Icon = styled.svg`
width: 24px;
height: 24px;
`;

export const Text = styled.p`
color: ${colors.textWhite03};
font-family: Roboto;
font-size: 14px;
font-style: normal;
line-height: 1.3;
margin: 0;
width: 303px;
${mq.tablet} {
font-size: 16px;
line-height: 1.5;
width: 407px;
}
`;

0 comments on commit 001610d

Please sign in to comment.