Skip to content

Instantly share code, notes, and snippets.

@HyunSeob
Last active July 15, 2018 07:01
Show Gist options
  • Save HyunSeob/673291d9f778c1a8ae6b791616cbf62a to your computer and use it in GitHub Desktop.
Save HyunSeob/673291d9f778c1a8ae6b791616cbf62a to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
enum ToastSize {
SMALL,
MEDIUM,
LARGE
}
enum ToastType {
INFO,
SUCCESS,
ERROR,
WARN
}
namespace Toast {
export type Size = ToastSize
export type Type = ToastType
export interface Props {
size: Toast.Size
type: Toast.Type
}
}
class Toast extends Component<Toast.Props>{
static Size = ToastSize
static Type = ToastType
render() {
// ...
}
}
export default Toast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment