Skip to content

Commit

Permalink
mix style to root element
Browse files Browse the repository at this point in the history
  • Loading branch information
dntzhang committed Nov 7, 2018
1 parent b365222 commit cdea37c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/omi-element-ui/src/elements/button/index.js
Expand Up @@ -17,8 +17,8 @@ class MyApp extends WeElement {
return (
<div>
<div>
<el-button onClick={this.onClick}>默认按钮1</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button onClick={this.onClick} style="color:red;">默认按钮1</el-button>
<el-button type="primary" style={{color:'red'}}>主要按钮</el-button>
<el-button type="success">成功按钮</el-button>
<el-button type="info">信息按钮</el-button>
<el-button type="warning">警告按钮</el-button>
Expand Down
2 changes: 1 addition & 1 deletion packages/omi-element-ui/src/index.js
@@ -1,2 +1,2 @@
//you can change this to debug your elemnts
location.href = 'switch.html'
location.href = 'button.html'
4 changes: 2 additions & 2 deletions packages/omi-element-ui/src/omi-element-ui/el-button/index.js
Expand Up @@ -37,15 +37,15 @@ define('el-button', class extends WeElement {
}
if (props.iconRight) {
return (
<button onClick={this.onClick} class={classStr}>
<button style={props.style} onClick={this.onClick} class={classStr}>
<slot />
{props.icon && <i class={props.icon} />}
</button>
)
}

return (
<button onClick={this.onClick} class={classStr}>
<button style={props.style} onClick={this.onClick} class={classStr}>
{props.icon && <i class={props.icon} />}
<slot />
</button>
Expand Down

0 comments on commit cdea37c

Please sign in to comment.