Quickstart: Component - guardian/support-frontend GitHub Wiki
A quick guide on how to create a new React component from scratch.
import React from 'react';
import { css } from '@emotion/react';
const personContainer = css`
color: blue;
`;
const personGreeting = css`
font-weight: bold;
`;
type HelloPersonProps = {
name: string;
};
export default function HelloPerson(props: HelloPersonProps) {
return (
<div css={personContainer}>
<p css={personGreeting}>Hello {props.name}!</p>
</div>
);
}