Last active
July 15, 2018 07:01
-
-
Save HyunSeob/673291d9f778c1a8ae6b791616cbf62a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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