juliancwirko / react-s-alert

Alerts / Notifications for React with rich configuration options
https://www.npmjs.com/package/react-s-alert
MIT License
649 stars 75 forks source link

message can be displayed on center? #2

Open tonyzheng121 opened 8 years ago

tonyzheng121 commented 8 years ago

message can be displayed on center?

juliancwirko commented 8 years ago

Unfortunately not yet, I plan to implement it. For now you can manipulate css to achieve it.

zhaoyao91 commented 7 years ago

bottom-center is popular and needed

nghiepdev commented 6 years ago

The issue has created a long time, but the present is not yet 😢

fweffort commented 6 years ago

+1

kaspertiel commented 6 years ago

just do

.s-alert-box-inner {
    text-align: center;
}
AndreyPatseiko commented 5 years ago

I used center align only warning messages, and added this css

.s-alert-warning {
     right: 50vw;
     left: 50vw;
     transform: translateX(-50%);         
 }

Apply:

Alert.warning(    <div>          text     </div>,
   {  position: 'bottom-right' ,  offset: 30 }
 );