-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add column list options #4170
Add column list options #4170
Changes from 24 commits
48cede7
3438193
6a8ec8d
23ffab6
1e4c447
3090ce8
cd2b49a
38cfeb9
2b1eff7
1768133
932a8f1
e888432
dc18f6c
734dfa3
1cf0701
243375b
37393a2
dd7a501
5e010dd
6c3aa77
19b54d5
40088db
a38663d
cf76e13
e62a910
9d544b0
9dfb8e5
dcd1dbd
252ebbb
3a535cc
8df9b5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// @flow | ||
import React from 'react'; | ||
import actionStyles from './action.scss'; | ||
|
||
type Props = { | ||
children: string, | ||
onClick: () => void, | ||
}; | ||
|
||
export default class Action extends React.PureComponent<Props> { | ||
render() { | ||
const { | ||
onClick, | ||
} = this.props; | ||
|
||
return ( | ||
<button className={actionStyles.action} onClick={onClick}> | ||
{this.props.children} | ||
</button> | ||
); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@import '../../containers/Application/colors.scss'; | ||
|
||
$hoverColor: $shakespeare; | ||
$fontColor: $black; | ||
|
||
.action { | ||
border: none; | ||
background: transparent; | ||
line-height: 14px; | ||
color: $fontColor; | ||
cursor: pointer; | ||
font-size: 12px; | ||
margin-bottom: 13px; | ||
position: relative; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? Has no effect on my machine, and messing with |
||
text-align: left; | ||
width: 100%; | ||
|
||
&:hover { | ||
color: $hoverColor; | ||
} | ||
|
||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
justify-content: center; | ||
height: 100%; | ||
width: 100%; | ||
cursor: grab; | ||
cursor: move; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
The `Button` component displays a button. | ||
|
||
``` | ||
```javascript | ||
const onClick = () => { | ||
/* do click things */ | ||
alert('Clicked this nice button, congrats!'); | ||
|
@@ -13,7 +13,7 @@ const onClick = () => { | |
</Button> | ||
``` | ||
|
||
``` | ||
```javascript | ||
const onClick = () => { | ||
/* do click things */ | ||
alert('Clicked this nice button, congrats!'); | ||
|
@@ -26,7 +26,7 @@ const onClick = () => { | |
</Button> | ||
``` | ||
|
||
``` | ||
```javascript | ||
const onClick = () => { | ||
/* do click things */ | ||
alert('Clicked this nice button, congrats!'); | ||
|
@@ -58,3 +58,35 @@ The buttons can also be used in combination with an icon. | |
Add something | ||
</Button> | ||
``` | ||
|
||
The prob `showDropdownIcon` displays a drop down icon on the right side. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have written |
||
|
||
```javascript | ||
<Button skin="icon" icon="su-plus" showDropdownIcon={true} /> | ||
``` | ||
|
||
```javascript | ||
<Button skin="primary" showDropdownIcon={true}> | ||
Add something | ||
</Button> | ||
``` | ||
|
||
```javascript | ||
<Button skin="secondary" showDropdownIcon={true}> | ||
Add something | ||
</Button> | ||
``` | ||
|
||
```javascript | ||
<Button skin="link" showDropdownIcon={true}> | ||
Add something | ||
</Button> | ||
``` | ||
|
||
It's also possible to have a icon and a drop down icon. | ||
|
||
```javascript | ||
<Button icon="su-plus" skin="primary" showDropdownIcon={true}> | ||
Add something | ||
</Button> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually rounded the margin values to even values, didn't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never heard of that..