diff --git a/client/src/components/diagram/ErrorBubble.tsx b/client/src/components/diagram/ErrorBubble.tsx new file mode 100644 index 0000000..7258b37 --- /dev/null +++ b/client/src/components/diagram/ErrorBubble.tsx @@ -0,0 +1,19 @@ +import Bubble from '@components/todos/Bubble'; +import { ReactElement } from 'react'; +import Text from '@components/Text'; +import Image from '@components/Image'; +import Error from '@images/Error.svg'; +import { PRIMARY_COLORS } from '@util/Constants'; + +const { red } = PRIMARY_COLORS; + +const ErrorBubble = ({ text }: { text: string }): ReactElement => { + return ( + + + + + ); +}; + +export default ErrorBubble; diff --git a/client/src/components/diagram/WarningBubble.tsx b/client/src/components/diagram/WarningBubble.tsx new file mode 100644 index 0000000..942c090 --- /dev/null +++ b/client/src/components/diagram/WarningBubble.tsx @@ -0,0 +1,19 @@ +import Bubble from '@components/todos/Bubble'; +import { ReactElement } from 'react'; +import Text from '@components/Text'; +import Image from '@components/Image'; +import Warning from '@images/Warning.svg'; +import { PRIMARY_COLORS } from '@util/Constants'; + +const { yellow } = PRIMARY_COLORS; + +const WarningBubble = ({ text }: { text: string }): ReactElement => { + return ( + + + + + ); +}; + +export default WarningBubble; diff --git a/client/src/components/todos/Bubble.tsx b/client/src/components/todos/Bubble.tsx new file mode 100644 index 0000000..afa82c5 --- /dev/null +++ b/client/src/components/todos/Bubble.tsx @@ -0,0 +1,54 @@ +import { ReactElement, ReactNode } from 'react'; +import styled from 'styled-components'; +import { PRIMARY_COLORS } from '@util/Constants'; + +const { white, gray } = PRIMARY_COLORS; + +const Wrapper = styled.div<{ color?: string; backgroundColor?: string }>` + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: max-content; + height: max-content; + border-radius: 8px; + padding-block: 12px; + padding-inline: 12px; + color: ${(props) => props.color ?? white}; + background-color: ${(props) => props.backgroundColor ?? gray}; + gap: 10px; + filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)); + + &::after { + content: ''; + position: absolute; + width: 0; + height: 0; + right: 100%; + top: 50%; + transform: translate(0, -50%); + border-top: 7px solid transparent; + border-right: 8.5px solid ${(props) => props.backgroundColor ?? gray}; + border-bottom: 7px solid transparent; + border-left: 0px solid transparent; + filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)); + } +`; + +const Bubble = ({ + children, + color, + backgroundColor, +}: { + children: ReactNode; + color?: string; + backgroundColor?: string; +}): ReactElement => { + return ( + + {children} + + ); +}; + +export default Bubble; diff --git a/client/src/images/Error.svg b/client/src/images/Error.svg new file mode 100644 index 0000000..971ef43 --- /dev/null +++ b/client/src/images/Error.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/client/src/images/Warning.svg b/client/src/images/Warning.svg new file mode 100644 index 0000000..7e5d243 --- /dev/null +++ b/client/src/images/Warning.svg @@ -0,0 +1,5 @@ + + + + +