thinkful-ui
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "thinkful-ui", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Shared navigation and UI resources for Thinkful.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.es6", |
@@ -0,1 +1,3 @@ | ||
require('./availability_grid.less'); | ||
const React = require('react/addons'); | ||
@@ -35,3 +37,3 @@ const classNames = require('classnames'); | ||
handleMouseEnter() { | ||
const {data, mouseDown, selectionMode, onSlotSelected, onSlotUnselected} = this.props; | ||
const {data, mouseDown, dayIndex, selectionMode, onSlotSelected, onSlotUnselected} = this.props; | ||
@@ -111,7 +113,13 @@ if (mouseDown === 1) { | ||
// precalculate the slot names one time | ||
let formatString = 'ha'; | ||
if (this.props.slotsHour > 1) { | ||
formatString = 'h:mma'; | ||
} | ||
slotNames = Array.fill(new Array(SLOTS_DAY)).map((slot, index) => ( | ||
moment(moment().format('YYYY-MM-DD')). | ||
add(MINUTES_SLOT * (index + 1)). | ||
format('hh:mm A') | ||
add(MINUTES_SLOT * (index + 1), 'minutes'). | ||
format(formatString) | ||
)); | ||
@@ -288,14 +296,16 @@ | ||
<div | ||
className="availability-grid-days"> | ||
{dayNodes} | ||
</div> | ||
<div | ||
className="availability-grid-slot-names"> | ||
{slotNames.slice(minSlot, maxSlot)} | ||
</div> | ||
<div | ||
className="availability-grid-days"> | ||
{dayNodes} | ||
</div> | ||
<input | ||
className="availability-grid-update-button" | ||
type="submit" | ||
onClick={this.handlePost} | ||
value="Update Availability"/> | ||
{this.props.onPost && ( | ||
<input | ||
className="button" | ||
type="submit" | ||
onClick={this.handlePost} | ||
value="Update Availability"/> | ||
)} | ||
</div> | ||
@@ -302,0 +312,0 @@ ); |
@@ -83,8 +83,11 @@ const React = require('react'); | ||
return ( | ||
<div | ||
className={buttonClasses} | ||
onClick={this._toggleOpen} | ||
data-clickable> | ||
{data[selectedInd] && data[selectedInd].displayName || defaultDisplay} | ||
<div className="dropdown-container"> | ||
<div | ||
className={buttonClasses} | ||
onClick={this._toggleOpen} | ||
data-clickable> | ||
{data[selectedInd] && data[selectedInd].displayName || defaultDisplay} | ||
<span className="icon-navigatedown" aria-hidden="true"></span> | ||
</div> | ||
<div | ||
className={dropdownClasses} | ||
@@ -91,0 +94,0 @@ onClick={this._handleChange}> |
@@ -27,3 +27,3 @@ const React = require('react'); | ||
<div className="sidebar-menu"> | ||
<div className="heading-small">{heading}</div> | ||
<div className="subheading">{heading}</div> | ||
{items} | ||
@@ -30,0 +30,0 @@ </div> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70271
34
730