Unverified Commit 80bc4231 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Add shared button styles + modify tag modal to match owner modal (#34)

* Add shared button styles + modify tag modal to match owner modal

* Some tweaks
parent 3d2c6b1e
...@@ -28,6 +28,38 @@ ...@@ -28,6 +28,38 @@
margin-bottom: 4px; margin-bottom: 4px;
} }
&.btn-cancel {
border-color: $gray-lighter;
font-family: $font-family-sans-serif-bold;
font-weight: $font-weight-sans-serif-bold;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
background-color: $gray-lighter;
border-color: $gray-lighter;
}
}
&.btn-flat-icon {
border: none;
color: $gray-light;
box-shadow: none !important;
padding: 0px;
text-align: left;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
background-color: transparent;
color: $gradient-4;
.icon {
background-color: $gradient-4;
}
}
}
&.btn-primary { &.btn-primary {
border-width: 2px; border-width: 2px;
-webkit-box-shadow: 8px 9px 20px -15px rgba(0,0,0,0.46); -webkit-box-shadow: 8px 9px 20px -15px rgba(0,0,0,0.46);
...@@ -37,6 +69,22 @@ ...@@ -37,6 +69,22 @@
font-weight: $font-weight-sans-serif-bold; font-weight: $font-weight-sans-serif-bold;
} }
&.btn-save {
color: white;
background-color: $gradient-4;
border-color: $gradient-4;
font-family: $font-family-sans-serif-bold;
font-weight: $font-weight-sans-serif-bold;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
color: white;
background-color: $gradient-5;
border-color: $gradient-5;
}
}
&.disabled, &.disabled,
&:disabled { &:disabled {
-webkit-box-shadow: none; -webkit-box-shadow: none;
......
...@@ -145,7 +145,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> { ...@@ -145,7 +145,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> {
placeholder='Enter an email address' placeholder='Enter an email address'
ref={ this.inputRef } ref={ this.inputRef }
/> />
<button className="btn btn-light add-btn" type="submit" aria-label="Add Item"> <button className="btn btn-light add-button" type="submit" aria-label="Add Item">
<span aria-hidden="true">Add</span> <span aria-hidden="true">Add</span>
</button> </button>
</form> </form>
...@@ -156,7 +156,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> { ...@@ -156,7 +156,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> {
<li key={`modal-list-item:${key}`}> <li key={`modal-list-item:${key}`}>
{ React.createElement(AvatarLabel, this.state.tempItemProps[key]) } { React.createElement(AvatarLabel, this.state.tempItemProps[key]) }
<button <button
className='btn delete-button' className='btn btn-flat-icon delete-button'
aria-label='Delete Item' aria-label='Delete Item'
/* tslint:disable - TODO: Investigate jsx-no-lambda rule */ /* tslint:disable - TODO: Investigate jsx-no-lambda rule */
onClick={() => this.recordDeleteItem(key)} onClick={() => this.recordDeleteItem(key)}
...@@ -209,7 +209,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> { ...@@ -209,7 +209,7 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> {
{ {
!this.state.readOnly && !this.state.readOnly &&
<button <button
className='btn add-list-item' className='btn btn-flat-icon add-item-button'
onClick={this.handleShow}> onClick={this.handleShow}>
<img className='icon icon-plus-circle'/> <img className='icon icon-plus-circle'/>
<span>Add</span> <span>Add</span>
...@@ -222,8 +222,8 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> { ...@@ -222,8 +222,8 @@ class OwnerEditor extends React.Component<OwnerEditorProps, OwnerEditorState> {
</Modal.Header> </Modal.Header>
{ this.renderModalBody() } { this.renderModalBody() }
<Modal.Footer> <Modal.Footer>
<button type="button" className="btn cancel-btn" onClick={this.cancelEdit}>Cancel</button> <button type="button" className="btn btn-cancel" onClick={this.cancelEdit}>Cancel</button>
<button type="button" className="btn save-btn" onClick={this.saveEdit}>Save</button> <button type="button" className="btn btn-save" onClick={this.saveEdit}>Save</button>
</Modal.Footer> </Modal.Footer>
</Modal> </Modal>
</div> </div>
......
...@@ -3,25 +3,9 @@ ...@@ -3,25 +3,9 @@
@import 'variables'; @import 'variables';
.owner-editor-component { .owner-editor-component {
.btn.add-list-item { .btn.add-item-button {
color: $gray-light;
padding: 4px 1px;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-align: left;
height: 32px; height: 32px;
padding: 0px 1px;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
color: $gradient-4;
background-color: transparent;
border-color: transparent;
.icon {
background-color: $gradient-4;
}
}
} }
label { label {
...@@ -42,30 +26,15 @@ ...@@ -42,30 +26,15 @@
background-color: $gray-lightest; background-color: $gray-lightest;
.btn.delete-button { .btn.delete-button {
display: block; background-color: $gray-lightest;
display: block
} }
} }
.btn.delete-button { .btn.delete-button {
height: 24px;
width: 24px;
margin: auto; margin: auto;
margin-right: 0px; margin-right: 0px;
padding: 0;
display: none; display: none;
background-color: transparent;
border: none;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
background-color: transparent;
border-color: transparent;
.icon {
background-color: $gradient-4;
}
}
} }
} }
...@@ -73,34 +42,7 @@ ...@@ -73,34 +42,7 @@
margin-top: auto; margin-top: auto;
} }
.btn.save-btn { .btn.add-button {
color: white;
background-color: $gradient-4;
border-color: $gradient-4;
font-family: $font-family-sans-serif-bold;
font-weight: $font-weight-sans-serif-bold;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
color: white;
background-color: $gradient-5;
border-color: $gradient-5;
}
}
.btn.cancel-btn {
border-color: $gray-lighter;
font-family: $font-family-sans-serif-bold;
font-weight: $font-weight-sans-serif-bold;
&:focus,
&:not(.disabled):hover,
&:not([disabled]):hover {
background-color: $gray-lighter;
}
}
.btn.add-btn {
margin-left: 8px; margin-left: 8px;
} }
......
...@@ -270,15 +270,15 @@ class TagInput extends React.Component<TagInputProps, TagInputState> { ...@@ -270,15 +270,15 @@ class TagInput extends React.Component<TagInputProps, TagInputState> {
<div className='tag-input'> <div className='tag-input'>
{ tagBody } { tagBody }
<Modal className='tag-input-modal' show={this.state.showModal} onHide={this.handleClose}> <Modal className='tag-input-modal' show={this.state.showModal} onHide={this.handleClose}>
<Modal.Header className="text-center" closeButton={true}> <Modal.Header className="text-center" closeButton={false}>
<Modal.Title>Add/Remove Tags</Modal.Title> <Modal.Title>Add/Remove Tags</Modal.Title>
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>
{this.renderModalBody()} {this.renderModalBody()}
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
<button type="button" className="btn btn-light" onClick={this.handleSaveModalEdit}>Save</button> <button type="button" className="btn btn-cancel" onClick={this.handleClose}>Cancel</button>
<button type="button" className="btn btn-light" onClick={this.handleClose}>Cancel</button> <button type="button" className="btn btn-save" onClick={this.handleSaveModalEdit}>Save</button>
</Modal.Footer> </Modal.Footer>
</Modal> </Modal>
</div> </div>
......
...@@ -93,8 +93,4 @@ ...@@ -93,8 +93,4 @@
margin-left: 4px; margin-left: 4px;
} }
} }
.modal-footer button:hover {
background-color: $gray-lighter;
}
} }
...@@ -13,7 +13,7 @@ const AvatarLabel: React.SFC<AvatarLabelProps> = ({ label, src }) => { ...@@ -13,7 +13,7 @@ const AvatarLabel: React.SFC<AvatarLabelProps> = ({ label, src }) => {
return ( return (
<div className='avatar-label-component'> <div className='avatar-label-component'>
<div className='component-avatar'> <div className='component-avatar'>
<Avatar name={label} src={src} size={25} round={true} /> <Avatar name={label} src={src} size={24} round={true} />
</div> </div>
<label className='component-label'>{label}</label> <label className='component-label'>{label}</label>
</div> </div>
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
.avatar-label-component { .avatar-label-component {
display: flex; display: flex;
font-size: 12px; font-size: 12px;
width: 80%;
word-wrap: break-word; word-wrap: break-word;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment