Refactoring for Dialog component.

Signed-off-by: Iktwo Sh <elmaildeliktwo@gmail.com>