-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.5.0' into released
- Loading branch information
Showing
63 changed files
with
1,120 additions
and
480 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ public/polyfill | |
|
||
# misc | ||
.DS_Store | ||
.idea | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import '@storybook/addon-knobs/register' | ||
import '@storybook/addon-actions/register' | ||
import '@storybook/addon-links/register' | ||
import '@storybook/addon-viewport/register' |
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
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,29 @@ | ||
import React, { useEffect, useState, useRef } from 'react' | ||
import { styled } from '@material-ui/core/styles' | ||
import { useCapturedInput } from '../../utils/hooks/useCapturedEvents' | ||
|
||
const Input = styled('input')({ | ||
background: '#f2f3f5', | ||
border: '1px solid #ccd0d5', | ||
width: '100%', | ||
height: 34, | ||
borderRadius: 20, | ||
padding: '2px 1em', | ||
boxSizing: 'border-box', | ||
marginTop: 6, | ||
}) | ||
export function CommentBox(props: { onSubmit(newVal: string): void; display: boolean }) { | ||
const InputRef = useRef<HTMLInputElement | null>() | ||
const binder = useCapturedInput(InputRef, () => {}) | ||
useEffect( | ||
binder(['keypress'], e => { | ||
if (!InputRef.current) return | ||
if (e.key === 'Enter') { | ||
props.onSubmit(InputRef.current.value) | ||
InputRef.current.value = '' | ||
} | ||
}), | ||
) | ||
if (!props.display) return null | ||
return <Input ref={ref => (InputRef.current = ref)} placeholder="Maskbook!" /> | ||
} |
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.