Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(growth-hack): add feature growth hack
- Loading branch information
Showing
177 changed files
with
6,090 additions
and
1,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/__tests__/forms/CalloutPreview.test.tsx → src/__tests__/leads/CalloutPreview.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/__tests__/forms/ChooseType.test.tsx → src/__tests__/leads/ChooseType.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/__tests__/forms/CommonPreview.test.tsx → src/__tests__/leads/CommonPreview.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/__tests__/forms/SuccessPreview.test.tsx → src/__tests__/leads/SuccessPreview.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/__tests__/forms/SuccessStep.test.tsx → src/__tests__/leads/SuccessStep.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import Datetime from '@nateradebaugh/react-datetime'; | ||
import Icon from 'modules/common/components/Icon'; | ||
import { rgba } from 'modules/common/styles/color'; | ||
import colors from 'modules/common/styles/colors'; | ||
import * as React from 'react'; | ||
import styled from 'styled-components'; | ||
import styledTS from 'styled-components-ts'; | ||
|
||
export const DateWrapper = styledTS<{ color: string }>(styled.div)` | ||
position: relative; | ||
input { | ||
background-color: ${props => rgba(props.color, 0.1)}; | ||
color: ${props => props.color}; | ||
border: none; | ||
box-shadow: none; | ||
outline: 0; | ||
padding: 0 10px 0 25px; | ||
height: 25px; | ||
border-radius: 2px; | ||
font-weight: 500; | ||
line-height: 25px; | ||
width: 110px; | ||
font-size: 12px; | ||
&:hover { | ||
background: ${props => rgba(props.color, 0.15)}; | ||
cursor: pointer; | ||
} | ||
&:focus { | ||
box-shadow: none; | ||
} | ||
::placeholder { | ||
color: ${props => props.color}; | ||
font-weight: 500; | ||
opacity: 1; | ||
} | ||
} | ||
> i { | ||
color: ${props => props.color}; | ||
line-height: 25px; | ||
position: absolute; | ||
left: 7px; | ||
} | ||
`; | ||
|
||
type IProps = { | ||
onChange: ((value?: string | Date) => void); | ||
value: Date; | ||
isWarned?: boolean; | ||
}; | ||
|
||
class DueDateChanger extends React.Component<IProps> { | ||
render() { | ||
const { onChange, value, isWarned } = this.props; | ||
const color = isWarned ? colors.colorCoreRed : colors.colorPrimaryDark; | ||
|
||
return ( | ||
<DateWrapper color={color}> | ||
<Icon icon="clock-eight" /> | ||
<Datetime | ||
inputProps={{ placeholder: 'Due date' }} | ||
dateFormat="MMM,DD YYYY" | ||
timeFormat={false} | ||
value={value} | ||
closeOnSelect={true} | ||
onChange={onChange} | ||
utc={true} | ||
/> | ||
</DateWrapper> | ||
); | ||
} | ||
} | ||
|
||
export default DueDateChanger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.