Skip to content

Instantly share code, notes, and snippets.

@takahirohonda
Created October 14, 2021 03:44
Show Gist options
  • Save takahirohonda/c70016569cc056137449d4d2e32efe66 to your computer and use it in GitHub Desktop.
Save takahirohonda/c70016569cc056137449d4d2e32efe66 to your computer and use it in GitHub Desktop.
IllustrationContainer.tsx
import React from 'react';
import styles from './styles.scss';
export enum IllustrationSize {
Small = 'small',
Medium = 'medium',
Large = 'large',
}
export type IllustrationContainerProps = {
size?: IllustrationSize;
};
export const IllustrationContainer: React.FC<IllustrationContainerProps> = ({
children,
size = IllustrationSize.Small,
}) => <div className={styles[size]}>{children}</div>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment